TWI801717B - A physical image generation method and device, device, non-transitory computer-readable storage medium and computer program product - Google Patents
A physical image generation method and device, device, non-transitory computer-readable storage medium and computer program product Download PDFInfo
- Publication number
- TWI801717B TWI801717B TW109105431A TW109105431A TWI801717B TW I801717 B TWI801717 B TW I801717B TW 109105431 A TW109105431 A TW 109105431A TW 109105431 A TW109105431 A TW 109105431A TW I801717 B TWI801717 B TW I801717B
- Authority
- TW
- Taiwan
- Prior art keywords
- image
- images
- transformed
- physical
- different
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 238000004590 computer program Methods 0.000 title claims abstract description 19
- 230000009466 transformation Effects 0.000 claims abstract description 153
- 238000005286 illumination Methods 0.000 claims description 67
- 238000000844 transformation Methods 0.000 claims description 54
- 238000012549 training Methods 0.000 claims description 39
- 230000015654 memory Effects 0.000 claims description 32
- 238000012545 processing Methods 0.000 claims description 18
- 238000006243 chemical reaction Methods 0.000 claims description 6
- 238000004891 communication Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 8
- 238000012986 modification Methods 0.000 description 8
- 230000004048 modification Effects 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 230000001131 transforming effect Effects 0.000 description 6
- 238000000354 decomposition reaction Methods 0.000 description 5
- 239000000463 material Substances 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 238000003709 image segmentation Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 2
- 239000003086 colorant Substances 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000001502 supplementing effect Effects 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012552 review Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
- Magnetic Resonance Imaging Apparatus (AREA)
- Image Processing (AREA)
Abstract
本發明公開了一種實物圖像生成方法及裝置、設備、非暫態電腦可讀存儲介質及電腦程式產品,該方法為:對第一實物圖像進行本徵分解,獲取該第一實物圖像的第一反射圖像和第一照射圖像;對該第一反射圖像和該第一照射圖像中至少一個圖像進行至少一次變換;根據變換後的至少一個圖像、該第一反射圖像和該第一照射圖像,生成至少一個第二實物圖像。 The invention discloses a method, device, equipment, non-transitory computer-readable storage medium and computer program product for generating a physical image. The method includes: performing eigendecomposition on a first physical image to obtain the first physical image The first reflected image and the first illuminated image; performing at least one transformation on at least one of the first reflected image and the first illuminated image; according to the transformed at least one image, the first reflected image and the first illuminated image to generate at least one second physical image.
Description
本發明屬於電腦視覺領域,尤其關於一種實物圖像生成方法及裝置、設備、非暫態電腦可讀存儲介質及電腦程式產品。 The invention belongs to the field of computer vision, and in particular relates to a method, device, equipment, non-transitory computer-readable storage medium and computer program product for generating an object image.
隨圖像識別,是一種利用電腦對圖像進行處理、分析和理解,以識別各種不同模式的目標和對像的技術。舉例來說,對人臉進行識別,驗證身份。圖像識別模型需要用大量的實物圖片做訓練。 Image recognition is a technology that uses computers to process, analyze and understand images to identify targets and objects in various patterns. For example, face recognition and identity verification. Image recognition models need to use a large number of physical pictures for training.
對一個圖像識別模型來說,實物圖片數量越多,訓練資料覆蓋的場景越豐富,對實物的識別越準確。但是,人工採集實物圖片的有較大局限性,不能通過調整拍攝條件獲取到一部分場景下的實物圖片,尤其是拍攝條件的細微變化,人工調整拍攝條件會導致實物圖片採集誤差較大,從而造成一部分場景下的實物圖片缺失,訓練資料不完整,進而造成實物識別模型在缺失的這部分場景下,對實物不能準確識別。 For an image recognition model, the more pictures of real objects, the richer the scenes covered by the training data, and the more accurate the recognition of real objects. However, the manual collection of physical pictures has great limitations. It is impossible to obtain real pictures in some scenes by adjusting the shooting conditions, especially the slight changes in the shooting conditions. The physical pictures in some scenes are missing, and the training materials are incomplete, which in turn causes the physical recognition model to fail to accurately recognize the real objects in these missing scenes.
因此,現有技術中,人工採集實物圖片造成一部分場景下的實物圖像缺失,訓練資料不完整的問題亟待解決。 Therefore, in the prior art, manual collection of physical images results in the lack of physical images in some scenes, and the problem of incomplete training data needs to be solved urgently.
本發明實施例提供一種實物圖像生成方法及裝置、設備、非暫態電腦可讀存儲介質及電腦程式產品,解決了現有技術中,人工採集實物圖片造成一部分場景下的實物圖像缺失,訓練資料不完整的問題。 Embodiments of the present invention provide a physical image generation method, device, equipment, non-transitory computer-readable storage medium, and computer program products, which solve the problem of missing physical images in some scenes caused by manual collection of physical images in the prior art, and training The problem of incomplete information.
第一方面,本發明實施例提供一種實物圖像生成方法,包括:對第一實物圖像進行本徵分解,獲取該第一實物圖像的第一反射圖像和第一照射圖像;對該第一反射圖像和該第一照射圖像中至少一個圖像進行至少一次變換;根據變換後的至少一個圖像、該第一反射圖像和該第一照射圖像,生成至少一個第二實物圖像。 In the first aspect, an embodiment of the present invention provides a method for generating an object image, including: performing eigendecomposition on the first object image, and acquiring a first reflection image and a first illumination image of the first object image; At least one of the first reflected image and the first illuminated image is transformed at least once; and at least one first reflected image is generated based on the transformed at least one image, the first reflected image, and the first illuminated image Two physical images.
可選的,該對該第一反射圖像和該第一照射圖像中至少一個圖像進行至少一次變換,包括:按照預設照射變換演算法中M個第一像素值變換規則,對該第一照射圖像中的像素值做M次不同的變換,獲取不同的M個變換後第二照射圖像;其中,該M次不同的變換中每次變換與該M個變換後的第二照射圖像中的一個第二照射圖像唯一對應;M為正整數;以及,該根據變換後的至少一個圖像、該第一反射圖像和該第一照射圖像,生成至少一個第二實物圖像,包括:根據該第一反射圖像和該M個變換後的第二照射圖像,生成與該第一實物圖像不同的M個第二實物圖像。 Optionally, performing at least one transformation on at least one of the first reflection image and the first illumination image includes: according to the M first pixel value transformation rules in the preset illumination transformation algorithm, transforming the The pixel values in the first illuminated image undergo M different transformations to obtain different M transformed second illuminated images; wherein, each transformation in the M different transformations is the same as the M transformed second One second irradiation image in the irradiation image is uniquely corresponding; M is a positive integer; and, according to the transformed at least one image, the first reflection image and the first irradiation image, at least one second irradiation image is generated. The real object image includes: generating M second real object images different from the first real object image according to the first reflected image and the M transformed second irradiation images.
可選的,該對該第一反射圖像和該第一照射圖像中至少一個圖像進行至少一次變換,包括:按照預設反射變換演算法中N個第二像素值變換規則,對該第一反射圖像中的像素值做N次不同的變換,獲取不同的N個變換後的第二反射圖像;其中,該N次不同的變換中每次變換與該N個變換後的第二反射圖像中的一個第二反射圖像唯一對應;N為正整數;以及該 根據變換後的至少一個圖像、該第一反射圖像和該第一照射圖像,生成至少一個第二實物圖像,包括:根據該第一照射圖像和該N個變換後的第二反射圖像,生成與該第一實物圖像不同的N個第二實物圖像。 Optionally, performing at least one transformation on at least one of the first reflection image and the first illumination image includes: according to the N second pixel value transformation rules in the preset reflection transformation algorithm, transforming the The pixel values in the first reflection image are transformed differently N times to obtain different N transformed second reflection images; wherein, each transformation in the N times of different transformations is the same as the first transformation after the N transformations A second reflection image in the two reflection images is uniquely corresponding; N is a positive integer; and the Generating at least one second object image according to the transformed at least one image, the first reflected image and the first illuminated image, comprising: according to the first illuminated image and the N transformed second Reflecting the image, generating N second physical images different from the first real image.
可選的,該對該第一反射圖像和該第一照射圖像中至少一個圖像進行至少一次變換,包括:按照預設照射變換演算法中P個第三像素值變換規則,對該第一照射圖像中的像素值做P次不同的變換,獲取不同的P個變換後的第三照射圖像;其中,該P次不同的變換中每次變換與該P個變換後的第三照射圖像中的一個第三照射圖像唯一對應;P為正整數;按照預設反射變換演算法中Q個第四像素值變換規則,對該第一反射圖像中的像素值做Q次不同的變換,獲取不同的Q個變換後的第三反射圖像;其中,該Q次不同的變換中每次變換與該Q個變換後的第三照射圖像中的一個第三照射圖像唯一對應;Q為正整數;以及該根據變換後的至少一個圖像、該第一反射圖像和該第一照射圖像,生成至少一個第二實物圖像,包括:根據該P個變換後的第三照射圖像和該Q個變換後的第三反射圖像,生成與該第一實物圖像不同P*Q個第二實物圖像。 Optionally, performing at least one transformation on at least one of the first reflection image and the first illumination image includes: according to the P third pixel value transformation rules in the preset illumination transformation algorithm, transforming the The pixel values in the first illuminated image are transformed differently for P times to obtain different P transformed third illuminated images; wherein, each transformation in the P different transforms is the same as the P transformed first A third irradiation image in the three irradiation images is uniquely corresponding; P is a positive integer; according to the Q fourth pixel value conversion rule in the preset reflection transformation algorithm, Q is performed on the pixel value in the first reflection image different transformations to obtain different Q transformed third reflected images; wherein, each transformation in the Q different transformed transformations is related to a third illuminated image in the Q transformed third illuminated images The image is uniquely corresponding; Q is a positive integer; and generating at least one second physical image according to the transformed at least one image, the first reflected image and the first illuminated image includes: according to the P transformations The final third irradiation image and the Q transformed third reflection images generate P*Q second physical images different from the first real image.
可選的,該生成至少一個第二實物圖像之後,還包括:將該至少一個第二實物圖像作為訓練資料,輸入至圖像識別模型;根據該訓練資料中每一張第二實物圖像,與該第二實物圖像輸入至該圖像識別模型後的輸出結果,更新該圖像識別模型的參數。 Optionally, after generating at least one second physical image, it also includes: inputting the at least one second physical image as training data into the image recognition model; according to each second physical image in the training data The parameters of the image recognition model are updated with the output result after inputting the second real object image into the image recognition model.
上述方法中,通過對第一實物圖像進行本徵分解,獲取該第一實物圖像的第一反射圖像和第一照射圖像,之後對該第一反射圖像和該第一照射圖像中至少一個圖像進行至少一次變換,因此可以獲取到變換後 的至少一個照射圖像以及反射圖像,再通過變換後的至少一個圖像、該第一反射圖像和該第一照射圖像相互結合,從而可以通過最初的第一實物圖像生成至少一個實物圖像,以此類推,對人工採集的每一張實物圖像都進行上述步驟,可大幅提升實物圖像,彌補一部分場景下人工採集實物圖像的缺失,達到對訓練資料進行補充的效果。 In the above method, by performing eigendecomposition on the first real object image, the first reflected image and the first illuminated image of the first real object image are obtained, and then the first reflected image and the first illuminated image are At least one image in the image is transformed at least once, so it is possible to obtain the transformed At least one of the illuminated image and the reflection image, and then the transformed at least one image, the first reflection image and the first illumination image are combined with each other, so that at least one Physical images, and so on, carry out the above steps for each physical image collected manually, which can greatly improve the physical image, make up for the lack of manual collection of physical images in some scenes, and achieve the effect of supplementing the training data .
第二方面,本發明實施例提供一種實物圖像生成裝置,包括:獲取模組,用於對第一實物圖像進行本徵分解,獲取該第一實物圖像的第一反射圖像和第一照射圖像;處理模組,用於對該第一反射圖像和該第一照射圖像中至少一個圖像進行至少一次變換;以及用於根據變換後的至少一個圖像、該第一反射圖像和該第一照射圖像,生成至少一個第二實物圖像。 In a second aspect, an embodiment of the present invention provides a device for generating an image of a real object, including: an acquisition module configured to perform eigendecomposition on a first image of an actual object, and acquire the first reflection image and the second reflected image of the first object image. An illuminated image; a processing module, configured to perform at least one transformation on at least one of the first reflected image and the first illuminated image; The reflected image and the first illuminated image generate at least one second physical image.
可選的,該處理模組,具體用於:按照預設照射變換演算法中M個第一像素值變換規則,對該第一照射圖像中的像素值做M次不同的變換,獲取不同的M個變換後第二照射圖像;其中,該M次不同的變換中每次變換與該M個變換後的第二照射圖像中的一個第二照射圖像唯一對應;M為正整數;根據該第一反射圖像和該M個變換後的第二照射圖像,生成與該第一實物圖像不同的M個第二實物圖像。 Optionally, the processing module is specifically used to: perform M different transformations on the pixel values in the first illumination image according to the M first pixel value transformation rules in the preset illumination transformation algorithm, and obtain different M transformed second illumination images; wherein, each transformation in the M different transformations is uniquely corresponding to one of the M transformed second illumination images; M is a positive integer ; Generate M second real object images different from the first real object image according to the first reflected image and the M transformed second illuminated images.
可選的,該處理模組,具體用於:按照預設反射變換演算法中N個第二像素值變換規則,對該第一反射圖像中的像素值做N次不同的變換,獲取不同的N個變換後的第二反射圖像;其中,該N次不同的變換中每次變換與該N個變換後的第二反射圖像中的一個第二反射圖像唯一對應;N為正整數;根據該第一照射圖像和該N個變換後的第二反射圖像,生成與該第一實物圖像不同的N個第二實物圖像。 Optionally, the processing module is specifically used to: perform N times of different transformations on the pixel values in the first reflection image according to the N second pixel value transformation rules in the preset reflection transformation algorithm, and obtain different The N transformed second reflection images; wherein, each transformation in the N different transformations is uniquely corresponding to one of the N transformed second reflection images; N is positive An integer; according to the first illuminated image and the N transformed second reflection images, generate N second real object images different from the first real object image.
可選的,該處理模組,具體用於:按照預設照射變換演算法中P個第三像素值變換規則,對該第一照射圖像中的像素值做P次不同的變換,獲取不同的P個變換後的第三照射圖像;其中,該P次不同的變換中每次變換與該P個變換後的第三照射圖像中的一個第三照射圖像唯一對應;P為正整數;按照預設反射變換演算法中Q個第四像素值變換規則,對該第一反射圖像中的像素值做Q次不同的變換,獲取不同的Q個變換後的第三反射圖像;其中,該Q次不同的變換中每次變換與該Q個變換後的第三照射圖像中的一個第三照射圖像唯一對應;Q為正整數;根據該P個變換後的第三照射圖像和該Q個變換後的第三反射圖像,生成與該第一實物圖像不同P*Q個第二實物圖像。 Optionally, the processing module is specifically used to: perform P different transformations on the pixel values in the first illumination image according to the P third pixel value transformation rules in the preset illumination transformation algorithm, and obtain different The P transformed third illumination images; wherein, each transformation in the P different transformations is uniquely corresponding to one of the P transformed third illumination images; P is positive Integer; according to the Q fourth pixel value transformation rules in the preset reflection transformation algorithm, perform Q different transformations on the pixel values in the first reflection image to obtain different Q transformations of the third reflection image ; Wherein, each transformation in the Q times of different transformations is uniquely corresponding to a third irradiation image in the Q transformed third irradiation images; Q is a positive integer; according to the P transformed third The irradiated image and the Q transformed third reflection images generate P*Q second physical images different from the first real image.
可選的,該處理模組,還用於:將該至少一個第二實物圖像作為訓練資料,輸入至圖像識別模型;根據該訓練資料中每一張第二實物圖像,與該第二實物圖像輸入至該圖像識別模型後的輸出結果,更新該圖像識別模型的參數。 Optionally, the processing module is also used to: input the at least one second physical image as training data into the image recognition model; according to each second physical image in the training data, the first 2. An output result after inputting the real object image into the image recognition model, and updating the parameters of the image recognition model.
第三方面,本發明實施例提供一種實物圖像生成設備,包括:至少一個處理器;以及,與該至少一個處理器通信連接的記憶體;其中,該記憶體存儲有可被該至少一個處理器執行的指令,該指令被該至少一個處理器執行,以使該至少一個處理器能夠執行上述第一方面所述之實物圖像生成方法。 In a third aspect, an embodiment of the present invention provides a physical image generation device, including: at least one processor; and a memory connected in communication with the at least one processor; wherein, the memory stores information that can be processed by the at least one processor Instructions executed by a processor, the instructions are executed by the at least one processor, so that the at least one processor can execute the method for generating an image of a physical object described in the first aspect above.
第四方面,本發明實施例提供一種非暫態電腦可讀存儲介質,該非暫態電腦可讀存儲介質存儲電腦指令,該電腦指令用於使該電腦執 行上述第一方面所述之實物圖像生成方法。 In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to make the computer execute Carry out the physical image generation method described in the first aspect above.
第五方面,本發明實施例提供一種電腦程式產品,該電腦程式產品包括存儲在非暫態電腦可讀存儲介質上的計算程式,該電腦程式包括程式指令,當該程式指令被電腦執行時,使該電腦執行上述第一方面所述之實物圖像生成方法。 In a fifth aspect, an embodiment of the present invention provides a computer program product, the computer program product includes a computing program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by the computer, The computer is made to execute the method for generating an image of a physical object described in the first aspect above.
201-203:步驟 201-203: Steps
401-404:步驟 401-404: Steps
501-506:步驟 501-506: steps
601:獲取模組 601: Get the module
602:處理模組 602: processing module
700:實物圖像生成設備 700: Physical image generation equipment
701:收發器 701: Transceiver
702:處理器 702: Processor
703:記憶體 703: memory
704:匯流排系統 704: bus bar system
圖1為本發明實施例一提供的一種實物圖像生成方法的整體流程圖; FIG. 1 is an overall flow chart of a method for generating an object image provided in Embodiment 1 of the present invention;
圖2為本發明實施例一提供的一種實物圖像生成方法的步驟流程圖; FIG. 2 is a flow chart of the steps of a method for generating an object image provided in Embodiment 1 of the present invention;
圖3為本發明實施例一提供的一種實物圖像生成方法對應本徵分解的示意圖; Fig. 3 is a schematic diagram corresponding to eigendecomposition of a physical image generation method provided by Embodiment 1 of the present invention;
圖4為本發明實施例二提供的一種實物圖像生成方法的步驟流程圖; FIG. 4 is a flow chart of the steps of a method for generating an object image provided in Embodiment 2 of the present invention;
圖5為本發明實施例三提供的一種實物圖像生成方法的步驟流程圖; FIG. 5 is a flow chart of the steps of a method for generating an object image provided by Embodiment 3 of the present invention;
圖6為一種應用於本發明實施例一、二和三的實物圖像生成裝置的結構示意圖; FIG. 6 is a schematic structural diagram of a physical image generating device applied to Embodiments 1, 2 and 3 of the present invention;
圖7為一種應用於本發明實施例一、二和三的實物圖像生成設備的結構示意圖。 FIG. 7 is a schematic structural diagram of an object image generating device applied to Embodiments 1, 2 and 3 of the present invention.
為利 貴審查委員了解本發明之技術特徵、內容與優點及其所能達到之功效,茲將本發明配合附圖及附件,並以實施例之表達形式詳細 說明如下,而其中所使用之圖式,其主旨僅為示意及輔助說明書之用,未必為本發明實施後之真實比例與精準配置,故不應就所附之圖式的比例與配置關係解讀、侷限本發明於實際實施上的申請範圍,合先敘明。 In order to facilitate the review committee to understand the technical features, content and advantages of the present invention and the effects it can achieve, the present invention is hereby combined with the accompanying drawings and appendices, and is described in detail in the form of an embodiment. The description is as follows, and the purpose of the diagrams used therein is only for illustration and auxiliary instructions, and may not be the true proportion and precise configuration of the present invention after implementation, so the proportion and configuration relationship of the attached diagrams should not be interpreted , Limit the scope of application of the present invention on the actual implementation, together describe first.
在本發明的描述中,需要理解的是,術語「中心」、「橫向」、「上」、「下」、「左」、「右」、「頂」、「底」、「內」、「外」等指示的方位或位置關係為基於圖式所示的方位或位置關係,僅是為了便於描述本發明和簡化描述,而不是指示或暗示所指的裝置或元件必須具有特定的方位、以特定的方位構造和操作,因此不能理解為對本發明的限制。 In describing the present invention, it is to be understood that the terms "center", "lateral", "upper", "lower", "left", "right", "top", "bottom", "inner", " The orientations or positional relationships indicated in the drawings are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred device or element must have a specific orientation, Specific orientation configurations and operations, therefore, are not to be construed as limitations on the invention.
圖像識別在電腦視覺領域中被廣泛應用,如各種人臉驗證系統,通過對人臉進行身份識別,獲取身份的許可權,從而進行操作等。實現圖像識別這一功能的工具是圖像識別模型。 Image recognition is widely used in the field of computer vision, such as various face verification systems, by identifying the face, obtaining the permission of the identity, and then operating it. The tool that realizes this function of image recognition is an image recognition model.
實現圖像識別功能之前,圖像識別模型需要用大量的實物圖片做訓練。對一個圖像識別模型來說,實物圖片數量越多,訓練資料覆蓋的場景越豐富,對實物的識別越準確。但是,人工採集實物圖片的有較大局限性,不能通過調整拍攝條件獲取到一部分場景下的實物圖片,尤其是拍攝條件的細微變化,人工調整拍攝條件會導致實物圖片採集誤差較大,從而造成一部分場景下的實物圖片缺失,訓練資料不完整,進而造成實物識別模型在缺失的這部分場景下,對實物不能準確識別。 Before realizing the image recognition function, the image recognition model needs to use a large number of physical pictures for training. For an image recognition model, the more pictures of real objects, the richer the scenes covered by the training data, and the more accurate the recognition of real objects. However, the manual collection of physical pictures has great limitations. It is impossible to obtain real pictures in some scenes by adjusting the shooting conditions, especially the slight changes in the shooting conditions. The physical pictures in some scenes are missing, and the training materials are incomplete, which in turn causes the physical recognition model to fail to accurately recognize the real objects in these missing scenes.
因此,本發明實施例提出了一種根據少量人工採集的實物圖像的生成更多個實物圖像的方法。如圖1所示,為本發明實施例中提供的一種實物圖像生成方法的整體流程圖。需要說明的是,圖1僅以一張人工採集的實物圖像為例說明該所述過程,人工採集的實物圖像也是在多個場景下 採集的。 Therefore, the embodiment of the present invention proposes a method for generating more physical images based on a small number of manually collected physical images. As shown in FIG. 1 , it is an overall flowchart of a method for generating an object image provided in an embodiment of the present invention. It should be noted that Figure 1 only uses a manually collected physical image as an example to illustrate the process, and the manually collected physical images are also displayed in multiple scenarios. Collected.
給定實物圖像,利用本徵分解演算法將實物圖像分解成照射圖像(Shading image)和反射圖像(Reflectance image)。其中,實物圖像為通過人工採集的初始圖像;照射圖像即反應原圖像光照情況的圖像;反射圖像指在變化的光照條件下能夠維持不變的圖像,反應了原始實物圖像的紋理、材質等。其中,實物圖像、照射圖像和反射圖像均有多個像素點組成,每個像素點都有像素值,各個像素點組合在一起形成圖像,產生視覺效果。每個像素點在實物圖像、照射圖像和反射圖像均有對應的像素值,且實物圖像、照射圖像和反射圖像中的每個像素值之間相互對應。 Given a real object image, use the intrinsic decomposition algorithm to decompose the real object image into a shading image (Shading image) and a reflection image (Reflectance image). Among them, the physical image is the initial image collected manually; the illuminated image is the image that reflects the illumination of the original image; the reflected image refers to the image that can remain unchanged under changing illumination conditions, reflecting the original object. Image textures, materials, etc. Among them, the physical image, the irradiated image and the reflected image are all composed of multiple pixels, each pixel has a pixel value, and the combination of each pixel forms an image and produces a visual effect. Each pixel point has a corresponding pixel value in the real object image, the irradiation image and the reflection image, and each pixel value in the real object image, the irradiation image and the reflection image corresponds to each other.
以一張人工採集的實物圖像為例,得到進行本徵分解後的一張照射圖像和反射圖像後,再對反射圖像和照射圖像做多次不同變換,每次變換後都得到一張與原反射圖像或照射圖像的像素值不完全相同的反射圖像或照射圖像,利用這些修改後的照射圖像和反射圖像便可生成大量與初始圖像集不同的實物圖像。其中,人工採集的實物圖像的亮度一般是由環境光照所影響的,而實物本身的材質資訊與光照情況無關。因此,本發明實施例對反射圖像變換不同的光照條件,得到不同光照條件的多張變換後的反射圖像;以及通過對照射圖像變換不同的紋理等條件,得到同一光照條件多張變換後的照射圖像。需要說明的是,上述變換反射圖像或照射圖像的具體方式均通過預設演算法對反射圖像或照射圖像中像素點的像素值做變換實現。 Taking a manually collected physical image as an example, after obtaining an irradiated image and a reflected image after eigendecomposition, the reflected image and the irradiated image are transformed several times. Obtain a reflected image or illuminated image whose pixel values are not exactly the same as those of the original reflected image or illuminated image, and use these modified illuminated and reflected images to generate a large number of images different from the original image set. Real image. Among them, the brightness of the artificially collected physical image is generally affected by the ambient light, while the material information of the physical object itself has nothing to do with the lighting conditions. Therefore, the embodiment of the present invention transforms the reflection image into different lighting conditions to obtain multiple transformed reflection images under different lighting conditions; post-irradiation image. It should be noted that, the above-mentioned specific ways of transforming the reflected image or the illuminated image are realized by transforming the pixel values of the pixels in the reflected image or the illuminated image through a preset algorithm.
下面結合圖2,對上述實物圖像生成方法做進一步地詳細介紹。 The above method for generating an object image will be further described in detail below in conjunction with FIG. 2 .
如圖2所示,為本發明實施例中提供的一種實物圖像生成方法的步驟流程圖。 As shown in FIG. 2 , it is a flow chart of steps of a method for generating an object image provided in an embodiment of the present invention.
步驟201:對第一實物圖像進行本徵分解,獲取該第一實物圖像的第一反射圖像和第一照射圖像。 Step 201: Perform eigendecomposition on the first object image, and acquire a first reflection image and a first illumination image of the first object image.
步驟201中,第一實物圖像(I)與第一反射圖像(R)、第一照射圖像(S)三者的關係可以由公式表示出來:
In
I(x,y)=S(x,y)*R(x,y) (1) I(x,y)=S(x,y)*R(x,y) (1)
其中(x,y)為像素在圖像中的像素座標。根據該公式,數值求解出反射圖(R)和照射圖(S),示意圖如圖3所示,圖3為本發明實施例中提供的一種第一實物圖像生成方法對應本徵分解的示意圖。其中第一行是第一實物圖像,中間行是第一反射圖像,最後一行是第一照射圖像。需要說明的是,由於只有第一實物圖像I中像素座標的像素值為已知量,而該像素座標對應的第一照射圖像的像素值和第一反射圖像的像素值不止有一組解,因此在本徵分解過程中,分解出來的第一照射圖像的像素值和第一反射圖像的像素值為隨機選擇的一組解。 Where (x, y) is the pixel coordinate of the pixel in the image. According to this formula, the reflection map (R) and the irradiation map (S) are numerically solved, and the schematic diagram is shown in Figure 3, which is a schematic diagram of the eigendecomposition corresponding to a first physical image generation method provided in the embodiment of the present invention . The first row is the first real object image, the middle row is the first reflected image, and the last row is the first illuminated image. It should be noted that, since only the pixel values of the pixel coordinates in the first real image I are known, the pixel coordinates correspond to more than one set of pixel values of the first illuminated image and the first reflected image Therefore, in the intrinsic decomposition process, the decomposed pixel values of the first illuminated image and the pixel values of the first reflected image are a set of randomly selected solutions.
步驟202:對該第一反射圖像和該第一照射圖像中至少一個圖像進行至少一次變換。 Step 202: Perform at least one transformation on at least one of the first reflected image and the first illuminated image.
步驟203:根據變換後的至少一個圖像、該第一反射圖像和該第一照射圖像,生成至少一個第二實物圖像。 Step 203: Generate at least one second physical object image according to the transformed at least one image, the first reflected image and the first illuminated image.
步驟202中,包括三種情形:第一種情形,至少一次變換以M次變換舉例,按照預設光照變換演算法中M個第一像素值變換規則,對第一照射圖像中的像素值做M次不同的變換,獲
取不同的M個變換後第二照射圖像;其中,M次不同的變換中每次變換與M個變換後的第二照射圖像中的一個第二照射圖像唯一對應;M為正整數;第二種情形,按照預設反射變換演算法中N個第二像素值變換規則,對該第一反射圖像中的像素值做N次不同的變換,獲取不同的N個變換後的第二反射圖像;其中,該N次不同的變換中每次變換與該N個變換後的第二反射圖像中的一個第二反射圖像唯一對應;N為正整數;第三種情形,按照預設照射變換演算法中P個第三像素值變換規則,對該第一照射圖像中的像素值做P次不同的變換,獲取不同的P個變換後的第三照射圖像;其中,該P次不同的變換中每次變換與該P個變換後的第三照射圖像中的一個第三照射圖像唯一對應;P為正整數。
In
另外,按照預設反射變換演算法中Q個第四像素值變換規則,對該第一反射圖像中的像素值做Q次不同的變換,獲取不同的Q個變換後的第三反射圖像;其中,該Q次不同的變換中每次變換與該Q個變換後的第三照射圖像中的一個第三照射圖像唯一對應;Q為正整數。 In addition, according to the Q fourth pixel value transformation rules in the preset reflection transformation algorithm, Q times of different transformations are performed on the pixel values in the first reflection image to obtain Q different transformed third reflection images ; Wherein, each transformation in the Q times of different transformations uniquely corresponds to a third illumination image among the Q transformed third illumination images; Q is a positive integer.
在上述三種情形中,以第一種情形舉例,該情形下預設照射變換演算法封裝在一個影像處理軟體,如openCV。影像處理軟體在調用光照條件變換演算法時,又有多種光照條件變換對應的第一像素值變換規則,即一種光照條件對應一個第一像素值變換規則。按照一個第一像素值變換規則對第一照射圖像的像素值進行變換,即可得到對應光照條件下變換後的照射圖像。第二種情形和第三種情形,也是根據光照條件或紋理預設了像素值轉換規則,通過改變像素值獲取到變換了光照條件或紋理的反射圖像和照射圖像,不再贅述。 In the above three cases, take the first case as an example, in this case, the default illumination transformation algorithm is packaged in an image processing software, such as openCV. When the image processing software invokes the light condition transformation algorithm, there are multiple first pixel value transformation rules corresponding to the light condition transformation, that is, one light condition corresponds to one first pixel value transformation rule. By transforming the pixel values of the first illumination image according to a first pixel value transformation rule, a transformed illumination image under corresponding lighting conditions can be obtained. In the second and third cases, pixel value conversion rules are preset according to lighting conditions or textures, and reflection images and illuminated images with changed lighting conditions or textures are obtained by changing pixel values, so details will not be repeated here.
步驟203中,分別對應步驟202中的情形,包括以下三種情形:第一種情形,進行了步驟202中第一種情形之後,根據該第一反射圖像和該M個變換後的第二照射圖像,生成與該第一實物圖像不同的M個第二實物圖像;第二種情形,進行了步驟202中第二種情形之後,根據該第一照射圖像和該N個變換後的第二反射圖像,生成與該第一實物圖像不同的N個第二實物圖像;第三種情形,進行了步驟202中第三種情形之後,根據該P個變換後的第三照射圖像和該Q個變換後的第三反射圖像,生成與該第一實物圖像不同P*Q個第二實物圖像。
In
綜上所述,步驟202~步驟203生成實物圖像共有如下三種情形,用公式表示如下:第一種情形,保持本徵分解階段得到的第一反射圖像(R)不變,對第一照射圖像(S)進行不同的修改,得到M次不同的第二照射圖像(AS(i)),然後利用公式(1)計算生成的實物圖像(AI(i)):AI(i)(x,y)=AS(i)(x,y)*AR(x,y),i=1,...,M(2)該情形下,通過修改第一照射圖像的光照條件,生成了實物圖像集:
To sum up, there are three situations in which the physical images are generated from
A=[AI(1),AI(2),...,AI(M)];第二種情形,保持本徵分解階段得到的第一照射圖像(S)不變,對第一反射圖像(R)進行N次不同的修改,得到不同的反射圖像(BRj),然後利用公式(1)計算生成的圖片(BIj):BIj(x,y)=BS(x,y)*BRj(x,y),j=1,...,N;(3)該情形下,通過修改第一反射圖像的紋理,生成了實物圖像集 A=[AI (1) ,AI (2) ,...,AI (M) ]; in the second case, the first illumination image (S) obtained in the intrinsic decomposition stage remains unchanged, and the first reflection The image (R) is modified N times to obtain different reflection images (BR j ), and then the generated image (BI j ) is calculated using the formula (1): BI j (x,y)=BS(x, y)*BR j (x,y), j=1,...,N; (3) In this case, by modifying the texture of the first reflection image, a physical image set is generated
B=[BI1,BI2,...,BIN]:第三種情形,對第一反射圖像(R)進行Q次不同的修改,得到不同的第三反射圖像(CRj),對每個第三反射圖像(CRj)保持不變,對第一照射圖像(S)進行P次不同的修改,得到不同的第三照射圖(CSj),然後利用公式(1)計算生成的圖片(CIj): B=[BI 1 ,BI 2 ,...,BI N ]: In the third case, Q times of different modifications are performed on the first reflected image (R) to obtain a different third reflected image (CR j ) , keep each third reflected image (CR j ) unchanged, and make P different modifications to the first illuminated image (S) to get a different third illuminated image (CS j ), then use the formula (1 ) to calculate the generated image (CI j ):
步驟203之後,另一種可選的實施方式為,將該至少一個第二實物圖像作為訓練資料,輸入至圖像識別模型;根據該訓練資料中每一張第二實物圖像,與該第二實物圖像輸入至該圖像識別模型後的輸出結果,更新該圖像識別模型的參數。通過生成的第二實物圖像,大幅增加了訓練資料量,可使得圖像識別模型更加精確。
After
如圖4所示,為本發明實施例二提供的一種實物圖像生成方法的步驟流程圖,本發明實施例二為一種基於本徵分解的多光照人臉圖像生成方法。光照變化是影響人臉識別性能的最關鍵因素,對所述問題的解決程度關係著人臉識別實用化進程的成敗。為了提高人臉識別模型對於光照的強健性,一個最直接的辦法是在訓練資料中加入不同光照條件下的人臉圖像,具體步驟如下:步驟401之前,收集一個通過人工拍攝得到的實物圖像集E,舉例來說,E包含100000張人臉圖像;步驟401:對實物圖像集E中每一個實物圖像進行本徵分解。
As shown in FIG. 4 , it is a flow chart of steps of a method for generating an object image provided by Embodiment 2 of the present invention. Embodiment 2 of the present invention is a method for generating a multi-illumination face image based on eigendecomposition. Illumination change is the most critical factor affecting the performance of face recognition, and the degree to which the problem is solved is related to the success or failure of the practical process of face recognition. In order to improve the robustness of the face recognition model to illumination, one of the most direct methods is to add face images under different illumination conditions to the training data. The specific steps are as follows: Before
步驟401中,舉例來說,k=1,2...100000,對實物圖像集E中的每一個圖片EIk,進行本徵分解,得到對應的反射圖像(ERk)、照射圖像(ESk)。
In
步驟402:保持反射圖像(ERk)不變,按照預設的光照條件修改演算法對照射圖像(ESk)進行n次不同修改。其中,n為大於1的整數。 Step 402: keep the reflected image (ER k ) unchanged, and perform n different modifications to the illuminated image (ES k ) according to a preset lighting condition modification algorithm. Wherein, n is an integer greater than 1.
步驟402中,每個照射圖像ESk均得到一個變換後的照射圖像集合
In
步驟403:根據變換後的照射圖像集合和反射圖像生成實物圖像集合。 Step 403: Generating a physical object image set according to the transformed irradiation image set and reflection image.
進而利用以下公式,生成實物圖像集合 Then use the following formula to generate a collection of physical images
;i=1,2...n。 ;i=1,2...n.
步驟404:確定資料集E中是否還有未進行步驟402和步驟403的實物圖像。
Step 404: Determine whether there are images of objects in the data set E that have not been subjected to
若是,則轉到步驟402;否則,將E中每張實物圖像生成的實物圖像集合,作為最終的生成訓練資料集合Eg。以實物圖像中含有100000張圖片為例,Eg=[E1,...,E100000],共含有100萬張圖片;利用資料集[E,Eg]進行實物識別模型的訓練,得到對光照條件更加強健性的實物識別模型。 If yes, go to step 402; otherwise, use the physical image set generated by each physical image in E as the final generated training data set E g . Taking 100,000 pictures in the physical image as an example, E g =[E 1 ,...,E 100000 ], which contains a total of 1 million pictures; use the data set [E,E g ] to train the physical recognition model, Obtain an object recognition model that is more robust to lighting conditions.
圖5為本發明實施例三提供的一種實物圖像生成方法的步驟流程圖,本發明實施例三為一種基於本徵分解的圖像分割訓練資料生成方法。圖像分割目的是將圖像分成各具特徵的區域並提取感興趣目標的技術,
這些特徵可以是像素、顏色、紋理等,提取目標可以是單個或多個區域。具體步驟如下:步驟501之前,收集一個通過人工拍攝得到的實物圖像集F,舉例來說,F包含1000張風景圖像;步驟501:對實物圖像集F中每一個實物圖像進行本徵分解。
FIG. 5 is a flow chart of steps of a method for generating an object image provided by Embodiment 3 of the present invention. Embodiment 3 of the present invention is a method for generating training data for image segmentation based on eigendecomposition. The purpose of image segmentation is to divide the image into regions with different characteristics and extract the target of interest.
These features can be pixels, colors, textures, etc., and the extraction targets can be single or multiple regions. The specific steps are as follows: Before
步驟501中,舉例來說,m=1,2...1000,對實物圖像集F中的每一個圖片FIm,進行本徵分解,得到對應的反射圖像(FRm)、照射圖像(FSm)。
In
步驟502:保持反射圖像(FRm)不變,根據預設的光照條件修改演算法對照射圖像(FSm)進行t次不同修改。需要說明的是,預設的光照條件變換演算法包含多個像素值變換規則,每個像素值變換規則都對應一張變換後的反射圖像。 Step 502: keep the reflected image (FR m ) unchanged, and perform t different modifications to the illuminated image (FS m ) according to the preset lighting condition modification algorithm. It should be noted that the preset lighting condition transformation algorithm includes multiple pixel value transformation rules, and each pixel value transformation rule corresponds to a transformed reflection image.
步驟502中,得到變換後的照射圖像集
In
步驟503:根據變換後的照射圖像集,生成實物圖像集 Step 503: Generating a real object image set according to the transformed irradiation image set
步驟503利用了以下公式進行變換: Step 503 utilizes the following formula to transform:
,i=1,...,t。 , i=1,...,t.
步驟504:保持照射圖像(FSm)不變,根據預設的紋理修改演算法對反射圖像(FRm)進行r次不同修改。需要說明的是,預設的紋理變換演算法包含多個像素值變換規則,每個像素值變換規則都對應一張變換後的反射圖像。 Step 504: keep the illuminated image (FS m ) unchanged, and perform r different modifications to the reflected image (FR m ) according to a preset texture modification algorithm. It should be noted that the preset texture transformation algorithm includes multiple pixel value transformation rules, and each pixel value transformation rule corresponds to a transformed reflection image.
步驟504中,得到變換後的反射圖像集
In
[FRm,1,...,FRm,r]。 [FR m,1 ,...,FR m,r ].
步驟505:根據變換後的反射圖像集,生成實物圖像集 Step 505: Generate a physical image set according to the transformed reflection image set
Fm '=[FIm,1,...,FIm,r]。 F m ' =[FI m,1 ,...,FI m,r ].
步驟505中利用了以下公式進行變換:
In
FIm,j(x,y)=FSm(x,y)*FRm,j(x,y),j=1,...,r。 FI m,j (x,y)=FS m (x,y)*FR m,j (x,y),j=1,...,r.
步驟506:確定資料集F中是否還有未進行步驟502且未進行步驟504的實物圖像。若是,則轉到步驟502;否則,將E中每張實物圖像生成的實物圖像集合,作為最終的生成訓練資料集合Fh=[F1,F1 '...,Ft,Fr ']。舉例來說,當t=r=10時,Fh中共含有2萬張實物圖像。利用資料集[F,Fh]進行圖像分割模型的訓練,利用光照條件和顏色、材質條件更為豐富的資料集進行模型訓練,會大幅提升其準確率。
Step 506: Determine whether there are images of real objects in the data set F that have not undergone
上述方法中,通過對第一實物圖像進行本徵分解,獲取該第一實物圖像的第一反射圖像和第一照射圖像,之後對該第一反射圖像和該第一照射圖像中至少一個圖像進行至少一次變換,因此可以獲取到變換後的至少一個照射圖像以及反射圖像,再通過變換後的至少一個圖像、該第一反射圖像和該第一照射圖像相互結合,從而可以通過最初的第一實物圖像生成至少一個實物圖像,以此類推,對人工採集的每一張實物圖像都進行上述步驟,可大幅提升實物圖像,彌補一部分場景下人工採集實物圖像的缺失,達到對訓練資料進行補充的效果。 In the above method, by performing eigendecomposition on the first real object image, the first reflected image and the first illuminated image of the first real object image are obtained, and then the first reflected image and the first illuminated image are At least one image in the image is transformed at least once, so at least one transformed irradiation image and reflected image can be obtained, and then the transformed at least one image, the first reflected image and the first illuminated image The images are combined with each other, so that at least one physical image can be generated from the initial first physical image, and so on, the above steps are carried out for each physical image collected manually, which can greatly improve the physical image and make up for part of the scene. The lack of manual collection of physical images can achieve the effect of supplementing the training data.
本發明實施例一、二和三中的一種根據少量人工採集的實物圖片生成大量訓練資料的方法,通過對人工採集的實物圖片進行本徵分解 得到照射圖和反射圖,在對照射圖和反射圖按照光照條件或紋理的變化,修改照射圖和反射圖,從而生成包含更加豐富的光照和紋理種類的實物圖片,擴展了圖像識別模型的訓練資料,使得圖像識別模型對不同場景下的實物識別更加準確、更加強健性。 A method of generating a large amount of training data based on a small amount of manually collected physical pictures in Embodiments 1, 2 and 3 of the present invention, by performing eigendecomposition on the manually collected physical pictures Obtain the illumination map and reflection map, modify the illumination map and reflection map according to the change of illumination conditions or texture, so as to generate a physical picture containing more abundant types of illumination and texture, and expand the image recognition model. The training data makes the image recognition model more accurate and robust to the recognition of objects in different scenarios.
本發明實施例大幅降低了人力投入;通過上述方式,可以生成大量實物圖像作為訓練資料,從而大幅降低資料積累成本,並在較短時間收集大量訓練資料。另外,可以根據具體應用場景,定制化地生成大量訓練資料;此方法可以在原有的實物圖像集的基礎上,生成包含更加豐富的光照和紋理種類的訓練資料集;生成的資料可以訓練出對光照影響更為強健性、對不同場景更加通用的模型,可以提高電腦視覺領域如人臉或物體的檢測與識別、圖像分割的表現。 The embodiment of the present invention greatly reduces manpower input; through the above method, a large number of physical images can be generated as training data, thereby greatly reducing the cost of data accumulation, and collecting a large amount of training data in a relatively short period of time. In addition, a large amount of training data can be customized according to specific application scenarios; this method can generate a training data set containing more abundant lighting and texture types on the basis of the original physical image set; the generated data can be trained to A model that is more robust to lighting effects and more general for different scenes can improve the performance of computer vision fields such as face or object detection and recognition, and image segmentation.
如圖6所示,為一種應用於本發明實施例一、二和三的實物圖像生成裝置的結構示意圖。 As shown in FIG. 6 , it is a schematic structural diagram of an object image generating device applied in Embodiments 1, 2 and 3 of the present invention.
本發明實施例提供一種實物圖像生成裝置,包括:獲取模組601,用於對第一實物圖像進行本徵分解,獲取該第一實物圖像的第一反射圖像和第一照射圖像;處理模組602,用於對該第一反射圖像和該第一照射圖像中至少一個圖像進行至少一次變換;以及用於根據變換後的至少一個圖像、該第一反射圖像和該第一照射圖像,生成至少一個第二實物圖像。
An embodiment of the present invention provides an object image generating device, including: an
可選的,該處理模組602,具體用於:按照預設照射變換演算法中M個第一像素值變換規則,對該第一照射圖像中的像素值做M次不同的變換,獲取不同的M個變換後第二照射圖像;其中,該M次不同的變換中
每次變換與該M個變換後的第二照射圖像中的一個第二照射圖像唯一對應;M為正整數;根據該第一反射圖像和該M個變換後的第二照射圖像,生成與該第一實物圖像不同的M個第二實物圖像。
Optionally, the
可選的,該處理模組602,具體用於:按照預設反射變換演算法中N個第二像素值變換規則,對該第一反射圖像中的像素值做N次不同的變換,獲取不同的N個變換後的第二反射圖像;其中,該N次不同的變換中每次變換與該N個變換後的第二反射圖像中的一個第二反射圖像唯一對應;N為正整數;根據該第一照射圖像和該N個變換後的第二反射圖像,生成與該第一實物圖像不同的N個第二實物圖像。
Optionally, the
可選的,該處理模組602,具體用於:按照預設照射變換演算法中P個第三像素值變換規則,對該第一照射圖像中的像素值做P次不同的變換,獲取不同的P個變換後的第三照射圖像;其中,該P次不同的變換中每次變換與該P個變換後的第三照射圖像中的一個第三照射圖像唯一對應;P為正整數;按照預設反射變換演算法中Q個第四像素值變換規則,對該第一反射圖像中的像素值做Q次不同的變換,獲取不同的Q個變換後的第三反射圖像;其中,該Q次不同的變換中每次變換與該Q個變換後的第三照射圖像中的一個第三照射圖像唯一對應;Q為正整數;根據該P個變換後的第三照射圖像和該Q個變換後的第三反射圖像,生成與該第一實物圖像不同P*Q個第二實物圖像。
Optionally, the
可選的,該處理模組602,還用於:將該至少一個第二實物圖像作為訓練資料,輸入至圖像識別模型;根據該訓練資料中每一張第二實物圖像,與該第二實物圖像輸入至該圖像識別模型後的輸出結果,更新該圖
像識別模型的參數。
Optionally, the
基於相同的技術構思,本發明實施例提供一種實物圖像生成設備。至少一個處理器;以及,與該至少一個處理器通信連接的記憶體;該記憶體存儲有可被該至少一個處理器執行的指令,該指令被該至少一個處理器執行,以使該至少一個處理器能夠執行上述實施例中的實物圖像生成方法。 Based on the same technical concept, an embodiment of the present invention provides a real object image generating device. at least one processor; and, a memory connected in communication with the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one The processor can execute the method for generating a real object image in the above-mentioned embodiments.
以一個處理器為例,圖7為本發明實施例提供的實物圖像生成設備的結構,該實物圖像生成設備700包括:收發器701、處理器702、記憶體703和匯流排系統704;其中,記憶體703,用於存放程式。具體地,程式可以包括程式碼,程式碼包括電腦操作指令。記憶體703可能為隨機存取記憶體(random access memory,簡稱RAM),也可能為非易失性記憶體(non-volatile memory),例如至少一個磁碟記憶體。圖中僅示出了一個記憶體,當然,記憶體也可以根據需要,設置為多個。記憶體703也可以是處理器702中的記憶體。
Taking a processor as an example, FIG. 7 shows the structure of a physical image generation device provided by an embodiment of the present invention. The physical
記憶體703存儲了如下的元素,可執行模組或者資料結構,或者它們的子集,或者它們的擴展集:操作指令:包括各種操作指令,用於實現各種操作。
The
作業系統:包括各種系統程式,用於實現各種基礎業務以及處理基於硬體的任務。 Operating system: includes various system programs for implementing various basic businesses and processing hardware-based tasks.
上述本發明實施例實物圖像生成方法可以應用於處理器702中,或者說由處理器702實現。處理器702可能是一種積體電路晶片,具有信號的處理能力。在實現過程中,上述實物圖像生成方法的各步驟可以通過處
理器702中的硬體的集成邏輯電路或者軟體形式的指令完成。上述的處理器702可以是通用處理器、數位訊號處理器(DSP)、專用積體電路(ASIC)、現場可程式設計閘陣列(FPGA)或者其他可程式設計邏輯器件、分立門或者電晶體邏輯器件、分立硬體元件。可以實現或者執行本發明實施例中的公開的各方法、步驟及邏輯框圖。通用處理器可以是微處理器或者該處理器也可以是任何常規的處理器等。結合本發明實施例所公開的方法的步驟可以直接體現為硬體解碼處理器執行完成,或者用解碼處理器中的硬體及軟體模組組合執行完成。軟體模組可以位於隨機記憶體,快閃記憶體、唯讀記憶體,可程式設計唯讀記憶體或者電可讀寫可程式設計記憶體、寄存器等本領域成熟的存儲介質中。該存儲介質位於記憶體703,處理器702讀取記憶體703中的資訊,結合其硬體執行以下步驟:該收發器701,用於對第一實物圖像進行本徵分解,獲取該第一實物圖像的第一反射圖像和第一照射圖像;該處理器702,用於對該第一反射圖像和該第一照射圖像中至少一個圖像進行至少一次變換;以及用於根據變換後的至少一個圖像、該第一反射圖像和該第一照射圖像,生成至少一個第二實物圖像。
The method for generating a real object image in the embodiment of the present invention described above may be applied to the
優選地,該處理器702具體用於:按照預設照射變換演算法中M個第一像素值變換規則,對該第一照射圖像中的像素值做M次不同的變換,獲取不同的M個變換後第二照射圖像;其中,該M次不同的變換中每次變換與該M個變換後的第二照射圖像中的一個第二照射圖像唯一對應;M為正整數;根據該第一反射圖像和該M個變換後的第二照射圖像,生成與該第一實物圖像不同的M個第二實物圖像。
Preferably, the
優選地,該處理器702具體用於:按照預設反射變換演算法中N個第二像素值變換規則,對該第一反射圖像中的像素值做N次不同的變換,獲取不同的N個變換後的第二反射圖像;其中,該N次不同的變換中每次變換與該N個變換後的第二反射圖像中的一個第二反射圖像唯一對應;N為正整數;根據該第一照射圖像和該N個變換後的第二反射圖像,生成與該第一實物圖像不同的N個第二實物圖像。
Preferably, the
優選地,該處理器702具體用於:按照預設照射變換演算法中P個第三像素值變換規則,對該第一照射圖像中的像素值做P次不同的變換,獲取不同的P個變換後的第三照射圖像;其中,該P次不同的變換中每次變換與該P個變換後的第三照射圖像中的一個第三照射圖像唯一對應;P為正整數;按照預設反射變換演算法中Q個第四像素值變換規則,對該第一反射圖像中的像素值做Q次不同的變換,獲取不同的Q個變換後的第三反射圖像;其中,該Q次不同的變換中每次變換與該Q個變換後的第三照射圖像中的一個第三照射圖像唯一對應;Q為正整數;根據該P個變換後的第三照射圖像和該Q個變換後的第三反射圖像,生成與該第一實物圖像不同P*Q個第二實物圖像。
Preferably, the
優選地,該處理器702還用於:將該至少一個第二實物圖像作為訓練資料,輸入至圖像識別模型;根據該訓練資料中每一張第二實物圖像,與該第二實物圖像輸入至該圖像識別模型後的輸出結果,更新該圖像識別模型的參數。
Preferably, the
本發明實施例的實物圖像生成設備以多種形式存在,包括但不限於: (1)行動個人電腦設備:這類設備屬於個人電腦的範疇,有計算和處理功能,一般也具備行動上網特性。這類終端包括:PDA、MID和UMPC設備等,例如iPad;(2)其他具有實物圖像生成功能的電子裝置。 The physical image generation device in the embodiment of the present invention exists in various forms, including but not limited to: (1) Mobile personal computer equipment: This type of equipment belongs to the category of personal computers, with computing and processing functions, and generally also has the characteristics of mobile Internet access. Such terminals include: PDA, MID and UMPC equipment, etc., such as iPad; (2) other electronic devices with the function of generating images of real objects.
本領域具通常知識者可以理解實現上述實施例方法中的全部或部分步驟是可以通過程式來指令相關的硬體來完成,該程式存儲在一個存儲介質中,包括若干指令用以使得一個設備(可以是單片機,晶片等)或處理器(processor)執行本發明各個實施例方法的全部或部分步驟。而前述的存儲介質包括:USB碟、行動硬碟、唯讀記憶體(ROM,Read-Only Memory)、隨機存取記憶體(RAM,Random Access Memory)、磁碟或者光碟等各種可以存儲程式碼的介質。 Those skilled in the art can understand that all or part of the steps in the method of the above-mentioned embodiments can be completed by instructing the relevant hardware through a program, the program is stored in a storage medium, and includes several instructions to make a device ( It may be a single-chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage media include: USB disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc., which can store program codes. medium.
另外,本發明還提供一種非暫態電腦可讀存儲介質,該非暫態電腦可讀存儲介質存儲電腦指令,該電腦指令用於使該電腦執行上述任一項所述之實物圖像生成方法。 In addition, the present invention also provides a non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to make the computer execute the physical image generation method described in any one of the above.
另外,本發明還提供一種電腦程式產品,該電腦程式產品包括存儲在非暫態電腦可讀存儲介質上的計算程式,該電腦程式包括程式指令,當該程式指令被電腦執行時,使該電腦執行上述任一項所述之實物圖像生成方法。 In addition, the present invention also provides a computer program product, the computer program product includes a computing program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by the computer, the computer Execute the physical image generation method described in any one of the above.
最後應說明的是:本領域具通常知識者應明白,本發明的實施例可提供為方法、系統、或電腦程式產品。因此,本發明可採用完全硬體實施例、完全軟體實施例、或結合軟體和硬體方面的實施例的形式。而且,本發明可採用在一個或多個其中包含有電腦可用程式碼的電腦可用存儲介 質(包括但不限於磁碟記憶體、光學記憶體等)上實施的電腦程式產品的形式。 Finally, it should be noted that those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may be embodied in one or more computer usable storage media having computer usable program code embodied therein. In the form of computer program products implemented on physical media (including but not limited to disk memory, optical memory, etc.).
對於軟體實現,可通過執行本發明實施例所述功能的模組(例如過程、函數等)來實現本發明實施例所述之技術。軟體代碼可存儲在記憶體中並通過處理器執行。記憶體可以在處理器中或在處理器外部實現。 For software implementation, the technology described in the embodiments of the present invention can be implemented through modules (such as procedures, functions, etc.) that execute the functions described in the embodiments of the present invention. Software codes may be stored in memory and executed by a processor. Memory can be implemented within the processor or external to the processor.
本發明是參照根據本發明的方法、設備(系統)、和電腦程式產品的流程圖和/或方框圖來描述的。應理解可由電腦程式指令實現流程圖和/或方框圖中的每一流程和/或方框、以及流程圖和/或方框圖中的流程和/或方框的結合。可提供這些電腦程式指令到通用電腦、專用電腦、嵌入式處理機或其他可程式設計資料處理設備的處理器以產生一個機器,使得通過電腦或其他可程式設計資料處理設備的處理器執行的指令產生用於實現在流程圖一個流程或多個流程和/或方框圖一個方框或多個方框中指定的功能的裝置。 The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the invention. It should be understood that each process and/or block in the flowchart and/or block diagram, and a combination of processes and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing equipment to produce a machine so that the instructions executed by the processor of the computer or other programmable data processing equipment Produce means for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
這些電腦程式指令也可存儲在能引導電腦或其他可程式設計資料處理設備以特定方式工作的電腦可讀記憶體中,使得存儲在該電腦可讀記憶體中的指令產生包括指令裝置的製造品,所述指令裝置實現在流程圖一個流程或多個流程和/或方框圖一個方框或多個方框中指定的功能。 These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, such that the instructions stored in the computer readable memory produce an article of manufacture including the instruction means , the instruction means implements the functions specified in one or more procedures of the flow chart and/or one or more blocks of the block diagram.
以上僅為本發明之較佳實施例,並非用來限定本發明之實施範圍,如果不脫離本發明之精神和範圍,對本發明進行修改或者等同替換,均應涵蓋在本發明申請專利範圍的保護範圍當中。 The above are only preferred embodiments of the present invention, and are not used to limit the implementation scope of the present invention. If the present invention is modified or equivalently replaced without departing from the spirit and scope of the present invention, it shall be covered by the protection of the patent scope of the present invention. in the range.
201-203:步驟 201-203: Steps
Claims (5)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910227393.2A CN109961488A (en) | 2019-03-25 | 2019-03-25 | A kind of material picture generation method and device |
CN201910227393.2 | 2019-03-25 |
Publications (2)
Publication Number | Publication Date |
---|---|
TW202105320A TW202105320A (en) | 2021-02-01 |
TWI801717B true TWI801717B (en) | 2023-05-11 |
Family
ID=67024923
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW109105431A TWI801717B (en) | 2019-03-25 | 2020-02-20 | A physical image generation method and device, device, non-transitory computer-readable storage medium and computer program product |
Country Status (3)
Country | Link |
---|---|
CN (1) | CN109961488A (en) |
TW (1) | TWI801717B (en) |
WO (1) | WO2020192262A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109961488A (en) * | 2019-03-25 | 2019-07-02 | 中国银联股份有限公司 | A kind of material picture generation method and device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100592763C (en) * | 2007-02-15 | 2010-02-24 | 北京思比科微电子技术有限公司 | Method and apparatus for regulating image brightness |
CN108388833A (en) * | 2018-01-15 | 2018-08-10 | 阿里巴巴集团控股有限公司 | A kind of image-recognizing method, device and equipment |
CN108460414A (en) * | 2018-02-27 | 2018-08-28 | 北京三快在线科技有限公司 | Generation method, device and the electronic equipment of training sample image |
WO2019014646A1 (en) * | 2017-07-13 | 2019-01-17 | Shiseido Americas Corporation | Virtual facial makeup removal, fast facial detection and landmark tracking |
TWI654584B (en) * | 2018-03-02 | 2019-03-21 | 由田新技股份有限公司 | Apparatus and method for enhancing optical characteristics of workpieces, deep learning method for enhancing optical characteristics of workpieces, and non-transitory computer readable recording medium |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8655102B2 (en) * | 2011-06-10 | 2014-02-18 | Tandent Vision Science, Inc. | Method and system for identifying tokens in an image |
CN103281513B (en) * | 2013-05-14 | 2016-03-30 | 西安理工大学 | Pedestrian recognition method in the supervisory control system of a kind of zero lap territory |
CN104700109B (en) * | 2015-03-24 | 2018-04-10 | 清华大学 | The decomposition method and device of EO-1 hyperion intrinsic image |
CN107103589B (en) * | 2017-03-21 | 2019-09-06 | 深圳市未来媒体技术研究院 | A kind of highlight area restorative procedure based on light field image |
CN108416805B (en) * | 2018-03-12 | 2021-09-24 | 中山大学 | Intrinsic image decomposition method and device based on deep learning |
CN109961488A (en) * | 2019-03-25 | 2019-07-02 | 中国银联股份有限公司 | A kind of material picture generation method and device |
-
2019
- 2019-03-25 CN CN201910227393.2A patent/CN109961488A/en active Pending
-
2020
- 2020-01-19 WO PCT/CN2020/073056 patent/WO2020192262A1/en active Application Filing
- 2020-02-20 TW TW109105431A patent/TWI801717B/en active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100592763C (en) * | 2007-02-15 | 2010-02-24 | 北京思比科微电子技术有限公司 | Method and apparatus for regulating image brightness |
WO2019014646A1 (en) * | 2017-07-13 | 2019-01-17 | Shiseido Americas Corporation | Virtual facial makeup removal, fast facial detection and landmark tracking |
CN108388833A (en) * | 2018-01-15 | 2018-08-10 | 阿里巴巴集团控股有限公司 | A kind of image-recognizing method, device and equipment |
CN108460414A (en) * | 2018-02-27 | 2018-08-28 | 北京三快在线科技有限公司 | Generation method, device and the electronic equipment of training sample image |
TWI654584B (en) * | 2018-03-02 | 2019-03-21 | 由田新技股份有限公司 | Apparatus and method for enhancing optical characteristics of workpieces, deep learning method for enhancing optical characteristics of workpieces, and non-transitory computer readable recording medium |
Also Published As
Publication number | Publication date |
---|---|
TW202105320A (en) | 2021-02-01 |
CN109961488A (en) | 2019-07-02 |
WO2020192262A1 (en) | 2020-10-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106778928B (en) | Image processing method and device | |
CN113256778B (en) | Method, device, medium and server for generating vehicle appearance part identification sample | |
US10824910B2 (en) | Image processing method, non-transitory computer readable storage medium and image processing system | |
CN114187450B (en) | Remote sensing image semantic segmentation method based on deep learning | |
CN112336342B (en) | Hand key point detection method and device and terminal equipment | |
CN111539247B (en) | Hyper-spectrum face recognition method and device, electronic equipment and storage medium thereof | |
US11830103B2 (en) | Method, apparatus, and computer program product for training a signature encoding module and a query processing module using augmented data | |
CN114758249B (en) | Target object monitoring method, device, equipment and medium based on field night environment | |
TWI801717B (en) | A physical image generation method and device, device, non-transitory computer-readable storage medium and computer program product | |
CN109523570A (en) | Beginning parameter transform model method and device | |
CN113378864B (en) | Method, device and equipment for determining anchor frame parameters and readable storage medium | |
CN114842240A (en) | Method for classifying images of leaves of MobileNet V2 crops by fusing ghost module and attention mechanism | |
CN112967213B (en) | License plate image enhancement method, device, equipment and storage medium | |
CN114119695A (en) | Image annotation method and device and electronic equipment | |
CN113191189A (en) | Face living body detection method, terminal device and computer readable storage medium | |
CN115630660B (en) | Barcode positioning method and device based on convolutional neural network | |
CN113012030A (en) | Image splicing method, device and equipment | |
CN115984712A (en) | Multi-scale feature-based remote sensing image small target detection method and system | |
CN116977539A (en) | Image processing method, apparatus, computer device, storage medium, and program product | |
CN108959707A (en) | A kind of BIM model texture and material method for visualizing based on Unity | |
CN113792671A (en) | Method and device for detecting face synthetic image, electronic equipment and medium | |
JP6175904B2 (en) | Verification target extraction system, verification target extraction method, verification target extraction program | |
CN115311296B (en) | Data generation method, image recognition method, computer storage medium and terminal device | |
US20240193980A1 (en) | Method for recognizing human body area in image, electronic device, and storage medium | |
JP2014206392A (en) | Program for plant kind discrimination and information processing device |