CN112562028A - Method, device and equipment for constructing image with moire fringes and storage medium - Google Patents

Method, device and equipment for constructing image with moire fringes and storage medium Download PDF

Info

Publication number
CN112562028A
CN112562028A CN202011410069.3A CN202011410069A CN112562028A CN 112562028 A CN112562028 A CN 112562028A CN 202011410069 A CN202011410069 A CN 202011410069A CN 112562028 A CN112562028 A CN 112562028A
Authority
CN
China
Prior art keywords
image
lines
moire
images
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011410069.3A
Other languages
Chinese (zh)
Inventor
王冲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
iFlytek Co Ltd
Original Assignee
iFlytek Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by iFlytek Co Ltd filed Critical iFlytek Co Ltd
Priority to CN202011410069.3A priority Critical patent/CN112562028A/en
Publication of CN112562028A publication Critical patent/CN112562028A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The application provides a method, a device, equipment and a storage medium for constructing a Moire pattern, wherein the method comprises the following steps: acquiring an image to be added with Moire patterns as a target image; creating two images with the same size as the target image; respectively drawing periodic lines on the two created images to obtain two images with the lines, wherein the two images with the lines contain the lines with the same type but different periods, and the absolute value of the period difference of the lines with the same type in the two images with the lines is smaller than a preset value; and generating an image with moire fringes according to the two images with lines and the target image. The method for constructing the image with the moire patterns can construct the image with the moire patterns based on a common image.

Description

Method, device and equipment for constructing image with moire fringes and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for constructing an image with moire fringes.
Background
Moire moire, also known as Moire moire, is an optical phenomenon first discovered by 18 st century French researchers. When an opaque periodic texture with transparent gaps is overlaid on another similar pattern, large scale spatial interference effects can occur, forming moire patterns. Moire is one manifestation of the beat phenomenon. Mathematically speaking, two equal amplitude sine waves of close frequency are superimposed and the amplitude of the resultant signal will vary according to the difference between the two frequencies. Similarly, the beat principle is also applicable to spatial ripples, superposition of stripes with slightly different spatial frequencies, and the beat can also be formed because the superposition positions can gradually shift due to the difference of the stripe intervals.
With the development of internet technology, image understanding is rapidly rising and developing, and the application of the image understanding is spread throughout the corners of national economy and social life, and great changes are being brought to the production mode, the working mode and the life mode of human beings. In many scenarios, the processing object of the image understanding tool photographs images for the display (images photographed for the screen of the display), however, the display photographed images are often accompanied by severe moire interference, which presents a huge challenge to the image understanding tool.
For image understanding tools based on deep learning, in order to obtain a model with better performance, a large number of Moire display photographed images are collected. However, collecting a large number of Moire display photographs requires a significant expenditure of labor, material, and time.
Disclosure of Invention
In view of the above, the present application provides a method, an apparatus, a device and a storage medium for constructing a moire pattern image, so as to solve the problem that a great amount of manpower, material resources and time costs are required to be consumed for collecting a great amount of moire pattern display photographed images, and the technical scheme is as follows:
a method of structuring a moire image, comprising:
creating two images with the same size as the target image;
respectively drawing periodic lines on the two created images to obtain two images with the lines, wherein the two images with the lines contain the lines with the same type but different periods, and the absolute value of the period difference of the lines with the same type in the two images with the lines is smaller than a preset value;
and generating an image with moire fringes according to the two images with lines and the target image.
Optionally, the method for constructing a moire image further includes:
and amplifying the image to be added with the moire fringes by a preset multiple, and taking the amplified image as the target image.
Optionally, the creating two images with the same size as the target image includes:
two solid color images are created that are the same size as the target image.
Optionally, the creating two pure color images with the same size as the target image includes:
two pure black images with the same size as the target image are created.
Optionally, the drawing periodic lines on the two created images respectively includes:
drawing lines of a first type on the created one of the images according to a first cycle; or drawing a first type of lines on one of the created images according to a first cycle, and drawing other types of lines;
drawing lines of a first type on the other image according to a second period; or drawing a first type of line on the other created image according to a second period, and drawing other types of lines;
the first period is different from the second period, and the absolute value of the difference value between the first period and the second period is smaller than a preset value.
Optionally, the generating a target image with moire patterns according to the two images with lines and the target image includes:
generating a Moire image according to the two images with the lines;
and generating a moire image according to the moire image and the target image.
Optionally, the generating a moire image according to the two images with lines includes:
carrying out perspective transformation on one of the images with lines to obtain a transformed image with lines;
fusing the other image with lines with the transformed image with lines to obtain a Moire image;
alternatively, the first and second electrodes may be,
respectively carrying out perspective transformation on the two images with lines according to different transformation parameters to obtain two transformed images with lines;
and fusing the two transformed strip images to obtain a Moire image.
Optionally, the generating a moire image according to the moire image and the target image includes:
performing perspective transformation on the target image according to a target transformation parameter to obtain a transformed image of the target image, wherein the target transformation parameter is a transformation parameter adopted when performing perspective transformation on one image of the two images with lines;
and generating an image with moire patterns according to the moire pattern image and the transformed image of the target image.
Optionally, the generating an image with moire according to the moire image and the transformed image of the target image includes:
processing the background in the moire image into white to obtain a processed image;
and generating an image with Moire patterns according to the processed image and the transformed image of the target image.
A moire pattern structuring device comprising: the system comprises an image acquisition module, an image creation module, a line drawing module and an image generation module;
the image acquisition module is used for acquiring an image to be added with Moire patterns as a target image;
the image creating module is used for creating two images with the same size as the target image;
the line drawing module is used for drawing periodic lines on the two created images respectively to obtain two images with the lines, wherein the two images with the lines contain the lines with the same type but different periods, and the absolute value of the period difference of the lines with the same type in the two images with the lines is smaller than a preset value;
and the image generation module is used for generating an image with moire fringes according to the two images with lines and the target image.
Optionally, the moire image structuring apparatus further includes: an image magnification module;
and the image amplification module is used for amplifying the image to be added with the moire fringes by a preset multiple and taking the amplified image as the target image.
Optionally, the image generating module includes: the moire image generation module and the moire image generation module are connected with the moire image generation module;
the moire image generation module is used for generating moire images according to the two images with the lines;
and the moire image generation module is used for generating a moire image according to the moire image and the target image.
A moire image structuring apparatus comprising: a memory and a processor;
the memory is used for storing programs;
the processor is configured to execute the program to implement the steps of any one of the above methods for constructing a moire image.
A readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of structuring moire images as defined in any one of the preceding claims.
According to the scheme, the method, the device, the equipment and the storage medium for constructing the image with the moire fringes provided by the application are used for firstly acquiring the image to be added with the moire fringes to serve as a target image, then creating two images with the same size as the target image, then respectively drawing periodic lines on the two created images, and finally generating the image with the moire fringes according to the two images with the lines and the target image. According to the construction method of the image with the moire patterns, the image with the moire patterns can be constructed based on the common image, so that when a training data set is constructed, a large amount of manpower, material resources and time cost are not needed to be consumed to collect training data.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic flow chart of a method for constructing a moire image according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of two groups of lines with slightly different periods of the same type interfering with each other to generate moire;
FIG. 3 is a partially enlarged view of an image with lines obtained after drawing vertical lines on a completely black image according to an embodiment of the present disclosure;
fig. 4 is a partially enlarged view of an image with lines obtained after drawing horizontal lines and vertical lines on a completely black image according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of a method for constructing a moire image according to an embodiment of the present disclosure;
FIG. 6 is a schematic flow chart of generating a moir é based on two images with lines and a target image according to an embodiment of the present disclosure;
FIG. 7 is a partially enlarged view of an image obtained by perspective transformation of an image with lines (horizontal and vertical lines) according to an embodiment of the present disclosure;
fig. 8 is an example of a moire image obtained by fusing one image with lines with another image with lines after perspective transformation according to an embodiment of the present disclosure;
fig. 9 is an example of a moire image constructed by using the method for constructing a moire image according to the embodiment of the present application;
FIG. 10 is a schematic structural diagram of a moire image structuring apparatus provided in an embodiment of the present application;
fig. 11 is a schematic structural diagram of a moire image structuring apparatus provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In view of the fact that collecting moire images requires a great deal of labor, material and time costs, the inventors thought that moire images could be forged by using common images, however, how to forge moire images by using common images is critical, and for this reason, the inventors conducted research and experiments, and finally proposed a method for constructing moire images through research and experiments.
The method for constructing the image with the moire fringes can be applied to equipment with an image acquisition function and an image processing function, such as a recording pen, a translator, a scanning pen, a smart phone and the like. The method of structuring moire images provided herein is described next by the following examples.
First embodiment
Referring to fig. 1, a schematic flow chart of a method for constructing a moire image according to an embodiment of the present application is shown, where the method may include:
step S101: and acquiring an image to be added with the Moire pattern as a target image.
The image to be added with moire fringes can be any type of image obtained by any means, for example, the image can be obtained by scanning, shooting, and the like, and the image can be a color image, a grayscale image, a black and white image, and the like.
Step S102: two images are created that are the same size as the target image.
In order to simplify the image processing process, the present embodiment preferably creates two pure color images having the same size as the target image, and more preferably, creates two pure black images having the same size as the target image, where a full black image is an image in which the pixel value of each pixel is 0.
Step S103: and respectively drawing periodic lines on the two created images to obtain two images with the lines.
It should be noted that a periodic line refers to a plurality of lines having the same interval, and a period refers to an interval between two lines.
The two images with lines comprise lines with the same type but different periods, and the absolute value of the period difference of the lines with the same type in the two images with the lines is smaller than a preset value.
Since two groups of similar lines with slightly different periods interfere with each other to generate moire, as shown in fig. 2, the embodiment draws the same type of lines with different periods and close periods on two images (e.g. two full black images), so that a moire image can be generated based on the two images with lines in the following.
There are various implementation manners for drawing periodic lines on two images, and this embodiment provides four optional implementation manners as follows:
the implementation mode is as follows: on one of the created images, lines of the first type are drawn at a first period, and on the other image created, lines of the first type are drawn at a second period.
For example, vertical lines may be drawn at a first cycle on one of the images created, and vertical lines may be drawn at a second cycle on the other image created. Fig. 3 shows a partial enlarged view of an image with lines obtained after drawing vertical lines on a solid black image.
The implementation mode two is as follows: and drawing lines of the first type on one of the created images according to a first period, drawing lines of the first type on the other created image according to a second period, and drawing lines of other types. The other lines may be periodic lines or non-periodic lines.
For example, horizontal lines may be drawn in a first cycle on one of the images created, and horizontal and vertical lines (i.e., a grid) may be drawn in a second cycle on the other image created. Fig. 4 shows a partially enlarged view of an image with lines obtained after drawing horizontal and vertical lines on a solid black image.
The implementation mode is three: drawing a first type of lines on one of the created images according to a first cycle, and drawing other types of lines; on the created other image, lines of the first type are drawn at a second cycle. The other lines may be periodic lines or non-periodic lines.
For example, horizontal lines and vertical lines may be drawn in a first cycle on one of the created images, and horizontal lines may be drawn in a second cycle on the other of the created images.
The implementation mode is four: and drawing the lines of the first type and drawing the lines of the other types according to a first period on one of the created images, and drawing the lines of the first type and drawing the lines of the other types according to a second period on the other created image. The other lines may be periodic lines or non-periodic lines.
For example, horizontal lines and vertical lines may be drawn at a first period on one of the completely black images created, and horizontal lines and vertical lines may be drawn at a second period on the other image created.
In the above four modes, the first period is different from the second period, and an absolute value of a difference between the first period and the second period is smaller than or equal to a preset value. Assuming that the first period is T1 and the second period is T2, optionally, the preset value may be 4, T2 may be equal to T1+1, T2 may also be equal to T1+1, T2 may also be equal to T1+4, and T1 may take 16 pixels.
It should be noted that, regardless of the way to draw lines on the created two images, the two images after drawing only need to include at least one line with the same type and a close period.
Step S104: and generating an image with moire fringes according to the two images with lines and the target image.
According to the construction method of the image with the moire fringes, the image to be added with the moire fringes is obtained and serves as a target image, then two images with the same size as the target image are created, periodic lines are drawn on the two created images respectively, and finally the image with the moire fringes is generated according to the two images with the lines and the target image. According to the construction method of the image with the moire patterns, provided by the embodiment of the application, the image with the moire patterns can be constructed on the basis of the common image, so that when a training data set is constructed, a large amount of manpower, material resources and time cost are not needed to be consumed for collecting the training data.
Second embodiment
As can be seen from the foregoing embodiments, the moire image structuring method provided in the foregoing embodiments directly fuses moire on the moire image to be added, that is, the moire image to be added is taken as a target image for subsequent processing, however, considering that the moire image is directly fused on the moire image to be added, the size ratio of the gap between the camera light-sensing unit and the pixel array of the display cannot be simulated, so that the finally structured moire image is not realistic enough, and in order to make the finally structured moire image more realistic, the present embodiment provides another implementation manner of the moire image structuring method.
Referring to fig. 5, another flow chart of a method for constructing a moire image is shown, which may include:
step S501: and acquiring an image of the Moire to be added.
The image to be added with moire fringes can be any type of image obtained by any means, for example, the image can be obtained by scanning, shooting, and the like, and the image can be a color image, a grayscale image, a black and white image, and the like.
Step S502: and amplifying the image to be added with the moire fringes by a preset time to obtain an amplified image serving as a target image.
The magnification factor for magnifying the image to be added with moire fringes can be determined according to the size ratio of the camera photosensitive unit to the pixel array gap of the display, for example, the size ratio of the camera photosensitive unit to the pixel array gap of the display is close to 4: 1, the image to be added with moire can be magnified by 4 times.
Step S503: two images are created that are the same size as the target image.
Preferably, two solid color images having the same size as the target image may be created, and more preferably, two solid black images having the same size as the target image may be created.
Step S504: and respectively drawing periodic lines on the two drawn images to obtain two images with the lines.
For the specific implementation process and the related explanation of this step, reference may be made to the specific implementation process and the related explanation of step S103 in the foregoing embodiment, and details of this embodiment are not described herein.
Step S505: and generating an image with moire fringes according to the two images with lines and the target image.
According to the construction method of the image with the moire fringes, the image to be added with the moire fringes is obtained firstly, the image to be added with the moire fringes is amplified by preset times and serves as a target image, two images with the same size as the target image are created, periodic lines are drawn on the two created images respectively, and finally the image with the moire fringes is generated according to the two images with the lines and the target image. The method for constructing the image with the moire fringes, provided by the embodiment of the application, can construct a more vivid image with the moire fringes based on a common image, so that a large amount of manpower, material resources and time cost are not required to be consumed to collect training data when a training data set is constructed.
Third embodimentExamples of the embodiments
This embodiment describes an implementation process of "generating a moire image from two images having lines and a target image" in the above embodiment.
Referring to fig. 6, a schematic flow chart of generating a moire image from two images with lines and a target image is shown, which may include:
step S601: and generating a Moire image according to the two images with the lines.
There are various implementations of generating moire images from two images with lines, and the embodiment provides the following three alternative implementations:
the first implementation mode comprises the following steps:
and weighting and summing the two images with lines, wherein the weighted and summed images are the moire images.
In consideration of the fact that the moire image obtained based on the first implementation may not be sufficiently realistic, the present embodiment provides the following second and third implementations:
the second implementation mode comprises the following steps:
step S601-a1, perspective transformation is carried out on one image with lines to obtain a transformed image with lines.
Referring to fig. 7, a partial enlarged view of an image obtained by subjecting an image having lines (horizontal and vertical lines) to perspective transformation is shown.
And step S601-a2, fusing the other image with lines with the transformed image with lines to obtain a Moire pattern image.
Specifically, the other image with lines and the transformed image with lines may be weighted and summed, and the weighted and summed image is the moire image. Optionally, the weight corresponding to the other image with lines and the weight corresponding to the transformed image with lines may be the same, for example, both the weights are 0.5, and certainly, the weight corresponding to the other image with lines and the weight corresponding to the transformed image with lines may also be different. Referring to fig. 8, a schematic diagram of a moire image obtained by weighting and summing another image with lines and a transformed striped image based on the same weight is shown.
The second implementation mode comprises the following steps:
and S601-b1, respectively carrying out perspective transformation on the two images with lines according to different transformation parameters to obtain two transformed images with lines.
And S601-b2, fusing the two transformed strip images to obtain a Moire pattern image.
Specifically, the two transformed striped images are subjected to weighted summation, and an image obtained by the weighted summation is the moire image. The weights respectively corresponding to the two transformed strip images may be the same, and of course, may also be different, and may be specifically set according to actual conditions.
Step S602: and generating a target image with moire patterns according to the moire pattern image and the target image.
There are various implementations of generating a moir é -bearing target image from a moir é image and a target image, and in one possible implementation:
the moire image and the target image can be directly fused to obtain a fused image, if the target image is the image to be added with moire, the fused image is the finally constructed image with moire, if the target image is the image to be added with moire, the fused image is reduced by a preset time, and the reduced image is the finally constructed image with moire. The method for fusing the moire image and the target image can be that the moire image and the target image are weighted and summed, and the weights corresponding to the moire image and the target image respectively can be set according to actual conditions.
Considering that in a real scene, when a camera is used to capture an object, the object has perspective deformation, in order to simulate the relationship between the deformation and moire, the present embodiment provides another implementation manner of generating a moire-carrying target image according to a moire image and a target image:
and step S6021, performing perspective transformation on the target image according to the target transformation parameter to obtain a transformed image of the target image.
It should be noted that perspective transformation of the target image can simulate the projection relationship of the display screen on the camera photosensitive unit.
The target transformation parameters based on which the target image is subjected to perspective transformation are transformation parameters adopted when one image of the two images with lines is subjected to perspective transformation.
Suppose that two images with lines are respectively Ipattern1And Ipattern2As mentioned above, in generating the Moire image, one of the two images with lines may be perspective transformed, for example, for Ipattern1The perspective transformation is performed based on transformation parameter 1, or the two images with lines can be transformed based on different transformation parameters, for example, Ipattern1Performing perspective transformation based on transformation parameter 1, and performing perspective transformation on Ipattern2Performing perspective transformation based on transformation parameter 2 if only I is subjected topattern1If perspective transformation is performed, the target transformation parameter in step S5021 is transformation parameter 1, and if it is for Ipattern1And Ipattern2If the perspective transformation is performed, the target transformation parameter may be transformation parameter 1 or transformation parameter 2.
Step S6022 generates a moir é -added image from the converted image of the moir é image and the target image.
Specifically, the process of generating the moire-carrying image according to the moire image and the transformed image of the target image includes:
step S6022-1: and processing the background in the Moire pattern image into white to obtain a processed image.
Assuming that the two created images are all black images, the moire image may be inverted to obtain a processed image, and the moire image is inverted, i.e. for each pixel in the moire image, the pixel value of the pixel is subtracted by 255.
Step S6022-2: and generating an image with moire fringes according to the processed image and the transformed image of the target image.
Specifically, the processed image and the transformed image of the target image are fused to obtain a fused image; if the target image is the image to be added with the moire fringes, the fused image is the finally constructed image with the moire fringes, if the target image is the image to be added with the moire fringes after being amplified by the preset times, the fused image is reduced by the preset times, the reduced image is the finally constructed image with the moire fringes, and the finally constructed image with the moire fringes is the same as the image to be added with the moire in size. FIG. 9 shows a schematic diagram of a constructed moir é textured target image.
The method for fusing the processed image and the transformed image of the target image may be that the processed image and the transformed image of the target image are weighted and summed, and the weighted and summed image is the fused image. Optionally, the weight corresponding to the processed image is the same as the weight corresponding to the transformed image of the target image, and certainly, the weight corresponding to the processed image and the weight corresponding to the transformed image of the target image may also be different, and the weights corresponding to the processed image and the transformed image of the target image may be set according to specific situations.
For any type of image acquired through any way, by the method for constructing the moire image provided by the above embodiment, the moire image can be constructed, so that when a large number of moire images need to be acquired, time and labor are not required to be wasted for collection, and in addition, if the target image used for constructing the moire image is an image with a label, the constructed moire image can directly use the label of the target image, so that a process of manually labeling the moire image is avoided, and the labeling time and the labeling cost are reduced.
Fourth embodiment
The embodiment of the present application further provides a moire image structuring device, which is described below, and the moire image structuring device described below and the moire image structuring method described above may be referred to correspondingly.
Referring to fig. 10, a schematic structural diagram of a structuring apparatus with moire patterns according to an embodiment of the present application is shown, which may include: an image acquisition module 1001, an image creation module 1002, a line drawing module 1003, and an image generation module 1004.
An image obtaining module 1001 is configured to obtain an image to be added with moire as a target image.
An image creation module 1002 for creating two images having the same size as the target image.
And a line drawing module 1003, configured to draw a periodic line on the created two images respectively, to obtain two images with lines.
The two images with lines comprise lines with the same type but different periods, and the absolute value of the period difference of the lines with the same type in the two images with the lines is smaller than a preset value.
An image generating module 1004, configured to generate an image with moire patterns according to the two images with lines and the target image.
Optionally, the structuring device with moire images provided in this embodiment of the present application may further include: and an image amplifying module.
And the image amplification module is used for amplifying the image to be added with the moire fringes by a preset multiple and taking the amplified image as the target image.
Optionally, the image creating module 1002 is specifically configured to create two pure color images with the same size as the target image.
Optionally, the image creating module 1002 is specifically configured to create two pure black images with the same size as the target image.
Optionally, the line drawing module 1003 is specifically configured to draw a first type of line according to a first cycle on one of the created images, or draw the first type of line according to the first cycle and draw other types of lines on one of the created images; and drawing the lines of the first type according to a second cycle on the created other image, or drawing the lines of the first type according to the second cycle and drawing the lines of other types on the created other image.
The first period is different from the second period, and the absolute value of the difference value between the first period and the second period is smaller than a preset value.
Optionally, the image generating module 1004 includes: the moire image generation module and the moire image generation module.
And the moire image generation module is used for generating moire images according to the two images with lines.
And the moire image generation module is used for generating a moire image according to the moire image and the target image.
Optionally, the moire image generation module is specifically configured to perform perspective transformation on one of the images with lines to obtain a transformed image with lines, and fuse the other image with lines with the transformed image with lines to obtain a moire image; or, respectively carrying out perspective transformation on the two images with lines according to different transformation parameters to obtain two transformed images with lines, and fusing the two transformed images with lines to obtain a Moire pattern image.
Optionally, the moire image generation module is specifically configured to perform perspective transformation on the target image according to a target transformation parameter to obtain a transformed image of the target image, and generate an image with moire according to the moire image and the transformed image of the target image.
The target transformation parameters are transformation parameters adopted when perspective transformation is carried out on one of the two images with lines.
Optionally, the moire image generation module is specifically configured to, when generating the moire image according to the moire image and the transformed image of the target image, process a background in the moire image into white to obtain a processed image, and generate the moire image according to the processed image and the transformed image of the target image.
The constructing device with the moire image provided by the embodiment of the application can construct the moire image based on the common image, so that when a training data set is constructed, a large amount of manpower, material resources and time cost are not needed to be consumed to collect training data.
Fifth embodiment
An embodiment of the present application further provides a moire image structuring device, please refer to fig. 11, which shows a schematic structural diagram of the moire image structuring device, and the moire image structuring device may include: at least one processor 1101, at least one communication interface 1102, at least one memory 1103, and at least one communication bus 1104;
in the embodiment of the present application, the number of the processor 1101, the communication interface 1102, the memory 1103 and the communication bus 1104 is at least one, and the processor 1101, the communication interface 1102 and the memory 1103 complete communication with each other through the communication bus 1104;
the processor 1101 may be a central processing unit CPU, or an application Specific Integrated circuit (asic), or one or more Integrated circuits configured to implement embodiments of the present invention, or the like;
the memory 1103 may include a high-speed RAM memory, a non-volatile memory (non-volatile memory), and the like, such as at least one disk memory;
wherein the memory stores a program and the processor can call the program stored in the memory, the program for:
acquiring an image to be added with Moire patterns as a target image;
creating two images with the same size as the target image;
respectively drawing periodic lines on the two created images to obtain two images with the lines, wherein the two images with the lines contain the lines with the same type but different periods, and the absolute value of the period difference of the lines with the same type in the two images with the lines is smaller than a preset value;
and generating an image with moire fringes according to the two images with lines and the target image.
Alternatively, the detailed function and the extended function of the program may be as described above.
Sixth embodiment
Embodiments of the present application further provide a readable storage medium, where a program suitable for being executed by a processor may be stored, where the program is configured to:
acquiring an image to be added with Moire patterns as a target image;
creating two images with the same size as the target image;
respectively drawing periodic lines on the two created images to obtain two images with the lines, wherein the two images with the lines contain the lines with the same type but different periods, and the absolute value of the period difference of the lines with the same type in the two images with the lines is smaller than a preset value;
and generating an image with moire fringes according to the two images with lines and the target image.
Alternatively, the detailed function and the extended function of the program may be as described above.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (14)

1. A method of structuring a moire image, comprising:
acquiring an image to be added with Moire patterns as a target image;
creating two images with the same size as the target image;
respectively drawing periodic lines on the two created images to obtain two images with the lines, wherein the two images with the lines contain the lines with the same type but different periods, and the absolute value of the period difference of the lines with the same type in the two images with the lines is smaller than a preset value;
and generating an image with moire fringes according to the two images with lines and the target image.
2. The method of structuring moire images as defined in claim 1 further comprising:
and amplifying the image to be added with the moire fringes by a preset multiple, and taking the amplified image as the target image.
3. A method of constructing a moir é image as defined in claim 1 or claim 2, wherein the creating two images of the same size as the target image comprises:
two solid color images are created that are the same size as the target image.
4. The method of constructing a moir é image as defined in claim 3, wherein the creating two solid color images of the same size as the target image comprises:
two pure black images with the same size as the target image are created.
5. A method for constructing a moire image as claimed in claim 1 or claim 2 wherein said drawing periodic lines on each of said two images created comprises:
drawing lines of a first type on the created one of the images according to a first cycle; or drawing a first type of lines on one of the created images according to a first cycle, and drawing other types of lines;
drawing lines of a first type on the other image according to a second period; or drawing a first type of line on the other created image according to a second period, and drawing other types of lines;
the first period is different from the second period, and the absolute value of the difference value between the first period and the second period is smaller than a preset value.
6. A method of constructing a moir é image as claimed in claim 1 or claim 2, wherein said generating a moir é image from said two images with lines and said target image comprises:
generating a Moire image according to the two images with the lines;
and generating a moire image according to the moire image and the target image.
7. The method of constructing a moire image as defined in claim 6 wherein said generating a moire image from said two images with lines comprises:
carrying out perspective transformation on one of the images with lines to obtain a transformed image with lines;
fusing the other image with lines with the transformed image with lines to obtain a Moire image;
alternatively, the first and second electrodes may be,
respectively carrying out perspective transformation on the two images with lines according to different transformation parameters to obtain two transformed images with lines;
and fusing the two transformed strip images to obtain a Moire image.
8. The method of constructing a moir é image of claim 7, wherein said generating a moir é image from the moir é image and the target image comprises:
performing perspective transformation on the target image according to a target transformation parameter to obtain a transformed image of the target image, wherein the target transformation parameter is a transformation parameter adopted when performing perspective transformation on one image of the two images with lines;
and generating an image with moire patterns according to the moire pattern image and the transformed image of the target image.
9. The method of constructing a moir é image of claim 8, wherein the generating a moir é image from the moir é image and the transformed image of the target image comprises:
processing the background in the moire image into white to obtain a processed image;
and generating an image with Moire patterns according to the processed image and the transformed image of the target image.
10. A moire pattern image structuring apparatus comprising: the system comprises an image acquisition module, an image creation module, a line drawing module and an image generation module;
the image acquisition module is used for acquiring an image to be added with Moire patterns as a target image;
the image creating module is used for creating two images with the same size as the target image;
the line drawing module is used for drawing periodic lines on the two created images respectively to obtain two images with the lines, wherein the two images with the lines contain the lines with the same type but different periods, and the absolute value of the period difference of the lines with the same type in the two images with the lines is smaller than a preset value;
and the image generation module is used for generating an image with moire fringes according to the two images with lines and the target image.
11. A moire pattern carrying construction device, comprising: an image magnification module;
and the image amplification module is used for amplifying the image to be added with the moire fringes by a preset multiple and taking the amplified image as the target image.
12. A moire image structuring device as defined in claim 10 or 11, wherein said image generating means comprises: the moire image generation module and the moire image generation module are connected with the moire image generation module;
the moire image generation module is used for generating moire images according to the two images with the lines;
and the moire image generation module is used for generating a moire image according to the moire image and the target image.
13. A moire image structuring apparatus comprising: a memory and a processor;
the memory is used for storing programs;
the processor is configured to execute the program to implement the steps of the method for constructing a moire image according to any one of claims 1 to 9.
14. A readable storage medium having stored thereon a computer program for implementing the steps of the method of structuring moire image as defined in any one of claims 1 to 9 when executed by a processor.
CN202011410069.3A 2020-12-03 2020-12-03 Method, device and equipment for constructing image with moire fringes and storage medium Pending CN112562028A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011410069.3A CN112562028A (en) 2020-12-03 2020-12-03 Method, device and equipment for constructing image with moire fringes and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011410069.3A CN112562028A (en) 2020-12-03 2020-12-03 Method, device and equipment for constructing image with moire fringes and storage medium

Publications (1)

Publication Number Publication Date
CN112562028A true CN112562028A (en) 2021-03-26

Family

ID=75048642

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011410069.3A Pending CN112562028A (en) 2020-12-03 2020-12-03 Method, device and equipment for constructing image with moire fringes and storage medium

Country Status (1)

Country Link
CN (1) CN112562028A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113486861A (en) * 2021-08-03 2021-10-08 北京百度网讯科技有限公司 Moire pattern picture generation method and device
CN115049760A (en) * 2022-08-16 2022-09-13 杭州海康威视数字技术股份有限公司 Moore effect enhancement-based video privacy protection method, device and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108986072A (en) * 2018-05-31 2018-12-11 京东方科技集团股份有限公司 Moire fringes method for quantitatively evaluating and product design method, computer-readable medium and electronic equipment
CN109146855A (en) * 2018-08-01 2019-01-04 Oppo广东移动通信有限公司 A kind of image mole marks detection method, terminal device and storage medium
CN109558794A (en) * 2018-10-17 2019-04-02 平安科技(深圳)有限公司 Image-recognizing method, device, equipment and storage medium based on moire fringes
CN110992244A (en) * 2019-10-31 2020-04-10 上海扩博智能技术有限公司 Picture generation method, system, equipment and storage medium with Moire patterns

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108986072A (en) * 2018-05-31 2018-12-11 京东方科技集团股份有限公司 Moire fringes method for quantitatively evaluating and product design method, computer-readable medium and electronic equipment
CN109146855A (en) * 2018-08-01 2019-01-04 Oppo广东移动通信有限公司 A kind of image mole marks detection method, terminal device and storage medium
CN109558794A (en) * 2018-10-17 2019-04-02 平安科技(深圳)有限公司 Image-recognizing method, device, equipment and storage medium based on moire fringes
CN110992244A (en) * 2019-10-31 2020-04-10 上海扩博智能技术有限公司 Picture generation method, system, equipment and storage medium with Moire patterns

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113486861A (en) * 2021-08-03 2021-10-08 北京百度网讯科技有限公司 Moire pattern picture generation method and device
CN115049760A (en) * 2022-08-16 2022-09-13 杭州海康威视数字技术股份有限公司 Moore effect enhancement-based video privacy protection method, device and equipment
CN115049760B (en) * 2022-08-16 2022-12-02 杭州海康威视数字技术股份有限公司 Moore effect enhancement-based video privacy protection method, device and equipment

Similar Documents

Publication Publication Date Title
CN102547124B (en) Method and device for photographic processing and mobile equipment
CN112562028A (en) Method, device and equipment for constructing image with moire fringes and storage medium
JP2006120166A (en) Perspective editing tool for 2-d image
CN109815843A (en) Object detection method and Related product
CN104662463A (en) Image processing apparatus, imaging system, and image processing system
CN102833460A (en) Image processing method, image processing device and scanner
JP2011170816A (en) Image processing apparatus and program
CN102509304A (en) Intelligent optimization-based camera calibration method
EP3822757A1 (en) Method and apparatus for setting background of ui control
CN103020908B (en) The method and apparatus of image noise reduction
CN112070854B (en) Image generation method, device, equipment and storage medium
CN111773710A (en) Texture image processing method and device, electronic equipment and storage medium
US9243935B2 (en) Distance information estimating apparatus
CN113269831B (en) Visual repositioning method, system and device based on scene coordinate regression network
JP2020030730A (en) House movement reading system, house movement reading method, house movement reading program, and house loss reading model
CN112652056B (en) 3D information display method and device
CN114332356A (en) Virtual and real picture combining method and device
CN115727869A (en) Map display method, map display device, computer equipment, medium and program product
JP2022117666A5 (en) Chart generation method, resolution measurement method, resolution measurement system, and program
CN113591528A (en) Document correction method, device, computer equipment and storage medium
CN111028290A (en) Graph processing method and device for picture book reading robot
Liu et al. RGB-D depth-map restoration using smooth depth neighborhood supports
CN116129206B (en) Processing method and device for image decoupling characterization learning and electronic equipment
CN110223336B (en) Plane fitting method based on TOF camera data
CN115861099B (en) Satellite cloud image restoration method introducing physical imaging priori knowledge constraint

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination