Moire pattern detection method based on dominant RGB channel characteristics
Through the detection method based on the characteristics of dominant RGB channels, combined with Gaussian high-pass filtering and convolutional neural network, the accuracy and promotional problems of molar pattern detection in the existing technology are solved, and efficient and accurate molar pattern detection effect is achieved.
Patent Information
- Application Number
- CN202510171998.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-06-06
Smart Images

Figure CN120107718A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of information security and relates to a moiré detection method based on dominant RGB channel features. The invention is an accurate and efficient method for detecting moiré patterns and applying the method to copy detection to prevent image theft. Background Art
[0002] Moiré patterns are a phenomenon caused by image resampling or interference effects between patterns, which may lead to loss of image quality and inaccurate information. They can also be used as the main basis for copy detection. The goal of moiré detection is to identify and locate moiré patterns in images by analyzing the features and textures of the image. Moiré detection is widely used in many fields, including image forensics, anti-copy fraud, image authenticity verification, and image theft prevention. It can help identify the source of an image, detect whether an image has been tampered with or copied, and provide protection for data integrity and information security.
[0003] The study of moiré patterns can be divided into two strategies: using feature extraction methods and adopting data-driven methods.
[0004] Some methods use existing feature extraction methods to identify moiré patterns in images, such as Gaussian difference filtering, wavelet transform, and Sobel filtering. Garcia et al. [DCGarcia and RLde Queiroz, "Face-spoofing 2d-detection based on Moiré-pattern analysis," IEEE transactions oninformation forensics and security, vol.10, no.4, pp.778–786, 2015] proposed a moiré detection method Peak based on frequency domain peak detection. They used Gaussian difference filters to separate moiré patterns. If an abnormal peak is found in the frequency domain, the image is considered a face spoofing image. Abraham et al. [E.Abraham, "Moiré pattern detection using wavelet decomposition and convolutional neural network," in 2018 IEEE Symposium Series on Computational Intelligence (SSCI). IEEE, 2018, pp. 1275–1279.] proposed the MDCNN method, which uses wavelet transform and multi-input deep convolutional network to capture images from computer screens.
[0005] Recently, with the revolution of computer vision led by deep learning, moiré detection and removal methods based on convolutional neural networks have also emerged. Abraham et al. [E.Abraham, "Moiré pattern detection using wavelet decomposition and convolutional neural network," in 2018IEEE Symposium Series on Computational Intelligence (SSCI). IEEE, 2018, pp. 1275–1279.] and He et al. [B.He, C.Wang, B.Shi, and L.-Y.Duan, "Mop moire patterns using mopnet," in Proceedings of the IEEE / CVF International Conference on Computer Vision, 2019, pp. 2424–2432.] combined feature extraction methods with neural networks. Some studies collected a large amount of data and designed complex network architectures. In [C. Yang, Z. Yang, Y. Ke, T. Chen, M. Grzegorzek, and J. See, "Doing more with Moiré pattern detection in digital photos," IEEE Transactions on Image Processing, vol. 32, pp. 694–708, 2023], Yang et al. introduced a framework for moiré detection, moiré Det, whose output is the location and density of moiré. Because the dataset used for training must contain the moiré layer of the image, moiré Det is a method that requires a lot of data support.
[0006] In the experiment, the Peak method achieved the highest recall and precision on the moiréFace dataset because its parameters were specially tuned for such scenarios, which also caused the method to perform poorly on other datasets. The MDCNN method can easily overfit the moiré images because it achieves the highest recall in most datasets. The reason is that the Haar wavelet has difficulty in eliminating high-frequency structures in natural images. In addition, the MDCNN has low accuracy because it only focuses on the coarse-grained features of the moiré and ignores the stripes and colors.
[0007] Most of the current moiré detection methods have the following problems: (1) Existing feature extraction methods cannot exploit the characteristics of moiré and cannot distinguish between the high-frequency structure of normal images and moiré; (2) The use of data-driven methods will lead to problems of complex network structure and high time complexity; (3) Data-driven methods are difficult to generalize to other datasets because they introduce a large amount of prior data. Summary of the invention
[0008] The present invention mainly improves the shortcomings of the above-mentioned moiré detection method and proposes a moiré detection method based on dominant RGB channel features. Specifically, through the analysis of moiré images, we observed the following phenomena: (1) moiré is more obvious in the bright area of the recaptured image; (2) the color of the moiré shows periodic changes. In combination with the generation mechanism of moiré, the present invention designs a unique dominant RGB channel feature. By evaluating the channel index with the maximum value in the RGB channel for each pixel in the image, a feasible way is provided to distinguish moiré from other high-frequency components in the image. The framework of feature extraction combined with a neural network is used to comprehensively mine the features of moiré, which is convenient for extension to other data sets.
[0009] In order to achieve the above object, the present invention adopts the following technical solution:
[0010] A moiré detection method based on dominant RGB channel features, the moiré detection method first preprocesses the training data. Secondly, the preprocessed data is subjected to feature extraction. Thirdly, the extracted feature image is used to train a neural network. Finally, the image to be tested is processed using the same preprocessing and feature extraction method, and the feature image is input into the neural network to obtain the detection result. The method comprises the following steps:
[0011] Step S1: Data preprocessing. Normalize the image data and sample to obtain a P×Q pixel image. The image has RGB channels and can be converted to the HSV color space to obtain its hue channel H, saturation channel S, and lightness channel V. Training data Includes N pictures and their labels, including moiré pictures and normal pictures. The label of moiré pictures is set to 1, and the label of normal pictures is set to 0.
[0012] Step S2: feature extraction;
[0013] Step S21: For any preprocessed image I, let I[p,q,j] be the pixel value at position (p,q) in channel j∈{r,g,b}. p and q represent the positions of pixels, p is the row index, which is an integer in [1,P]; q is the column index, which is an integer in [1,q]; j∈{r,g,b} is the RGB color channel index; specifically, I[P,Q,r] represents the red channel of image I; I[p,q,g] represents the green channel; and I[p,q,b] represents the blue channel. Calculate the image I obtained in step S1 according to the following formula to extract the dominant RGB channel features of the image;
[0014]
[0015] in, Represents the maximum value of the three RGB channel values of the image at the (p, q) position; the calculated M[p, q] represents the value of the dominant RGB channel feature map M at the (p, q) position.
[0016] like Figure 2 As shown in the figure, the dominant RGB channel features can distinguish moiré patterns from high-frequency structures in normal images. The periodic banded moiré patterns can be reflected in the dominant RGB channel feature map of the image. Therefore, the high-frequency part of the dominant RGB channel features can be used as an important basis for judging whether there are moiré patterns in the image.
[0017] Step S22: using Gaussian high-pass filtering to extract high-frequency parts of the dominant RGB channel features of the image;
[0018] Step S221: first, the feature map M is converted to the frequency domain Y by a two-dimensional discrete Fourier transform as shown in formula (2);
[0019]
[0020] Among them, Y[u,v] represents the transformed frequency domain image; u represents the row index in the frequency domain, ranging from 0 to P-1; v represents the column index in the frequency domain, ranging from 0 to Q-1; ω m ,ω n Represents the complex rotation factor in the two-dimensional discrete Fourier transform, which is used to calculate the frequency components in the frequency domain;
[0021] ω m =e -2πi / m ,
[0022] ω n =e -2πi / n .
[0023] Among them, e is a natural constant, i represents a unit complex number;
[0024] Step S222: Then, Gaussian high-pass filtering is used to reduce the low-frequency region in the frequency domain image Y, as shown in formula (3):
[0025]
[0026] Among them, Y′[u,v] represents the frequency domain image after high-pass filtering; σ is the standard deviation, which controls the width of the filter. According to experimental experience, σ=2 is taken;
[0027] Step S223: Finally, perform inverse Fourier transform on y′ obtained in step S222 to obtain the high-frequency part HF(m) of the dominant RGB channel feature map m;
[0028] Step S23: In order to ensure the generalization of the multi-input convolutional neural network, the hue channel H and saturation channel S of the image are processed by Gaussian high-pass filtering using the method of step S22 to obtain their high-frequency parts HF(H) and HF(S), respectively; and since the bright part of the image is more likely to have moiré, the brightness channel V of the image is also a feature that needs to be considered;
[0029] Step S3: network training;
[0030] Step S31: For training data According to step S2, the feature set is extracted Among them, M n It is picture I n The dominant RGB channel feature map, H n It is picture I n The hue channel, S n It is picture I n Saturation channel, V n It is picture I n The lightness channel, HF(M n ),HF(H n ),HF(S n ) is M n ,H n ,S n The high-frequency feature map is obtained by Gaussian high-pass filtering. The extracted feature HF(M n ),HF(H n ),HF(S n ) and V n , input into the convolutional neural network.
[0031] The multi-input convolutional neural network has seven convolutional layers conv1-conv7, a Maximum layer for finding the maximum value, a Multyply layer for finding the multiplication of corresponding positions of the matrix, and two fully connected layers FC1 and FC2. The convolutional layers conv1-conv4 use 32 convolutional kernels of size 6×6 with a stride of 1 pixel. The following pooling layer has a stride of 2 pixels. The convolutional layer conv5 has 32 convolutional kernels of size 3×3 with a stride of 1 pixel; conv6-conv7 has 16 convolutional kernels of size 3×3 with a stride of 1 pixel. The activation function of the convolutional layers in the network is Relu, and both use maximum pooling. The fully connected layer FC1 has 16 neurons, and FC2 has 1 neuron and uses the softmax activation function;
[0032] Features HF(M n ),HF(H n ),HF(S n ) and V n , after inputting the convolutional neural network: V n Through the convolution layer conv1, HF(M n ),HF(H n ),HF(S n ) pass through the convolutional layers conv2, conv3, and conv4 respectively. The Maxinum layer takes the maximum value of the convolution results of conv2, conv3, and conv4 by pixel. The Multyply layer multiplies the result of the Maxinum layer with the corresponding position of the convolution result of conv1. The result of the Multyply layer continues to pass through the convolutional layers conv5-conv7. Finally, the result of the convolutional layer conv7 is expanded to enter the fully connected layers FC1 and FC2;
[0033] Step S32: Use the cross entropy function to construct a loss function, as shown in formula (4):
[0034]
[0035] Among them, L represents the loss function; N represents the number of pictures; y n Indicates image I n The label; G(.) represents the convolutional neural network, and the output of the network G(HF(M n ),HF(H n ),HF(S n ),V n ) has a value range of (0,1), which means I n is the probability of a moiré image;
[0036] Step S33: Input the feature image data into the neural network in batches of 64, and update the multi-input convolutional neural network parameters using the stochastic gradient descent method with a step size of 0.01 according to the loss function shown in formula (4), and train for 200 steps;
[0037] Step S4: Detect moiré patterns; specifically:
[0038] Step S41: according to step S2, extract the features of the image I to be tested, and obtain feature graphs HF(M), HF(H), HF(S), V;
[0039] Step S42: Input the feature map obtained in step S41 into the convolutional neural network G trained in step S3 to obtain the probability value G(HF(M), HF(H), HF(S), V) of whether moiré exists in the image to be tested:
[0040] If the probability value is greater than or equal to 0.5, it indicates that moiré exists, and the P / 4×Q / 4 region with the largest sum of HF(M) pixel values is the region where moiré is most likely to occur.
[0041] If the probability value is less than 0.5, it means that there is no moiré.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] (1) The traditional method uses the classic edge feature extraction method, while the present invention proposes the dominant RGB channel feature, taking into account the unique properties of moiré patterns, which can avoid identifying the high-frequency structure of normal images as moiré patterns, and is helpful for judging moiré patterns images;
[0044] (2) The traditional method can only determine whether the image is a moiré image, while the present invention can visualize the area in the image where moiré is most likely to appear by analyzing the texture of the dominant RGB channel feature map.
[0045] (3) The present invention has the highest accuracy on the VINmoire dataset. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is the overall structure designed by the present invention.
[0047] Figure 2 Moire images (a) and normal images (b) from the VINmoire dataset. Moire is distributed locally in the moire image (left side of the middle row). The dominant RGB channel feature map of the moire image has obvious edges, while the dominant RGB channel feature map of the normal image has no significant response (last row).
[0048] Figure 3This is the network structure designed by the present invention.
[0049] Figure 4 and Figure 5 This is the output pattern of the present invention for detecting moiré patterns, and the area in the red frame is the area where moiré patterns are most likely to appear. Specific implementation methods
[0051] The technical solution of the present invention will be further described below in conjunction with specific embodiments and drawings.
[0052] A moiré detection method based on dominant RGB channel features, the steps are as follows:
[0053] Step S1: Data preprocessing. Normalize the image data and sample to obtain a 128×64 pixel image. The image has RGB channels and can be converted to the HSV color space to obtain its hue channel H, saturation channel S, and lightness channel V. Training data in the VINmoire dataset Includes 1000 normal images and 1500 moiré images and their labels. The label of the moiré image is set to 1, and the label of the normal image is set to 0.
[0054] Step S2: feature extraction;
[0055] Step S21: For any preprocessed image I, let I[p,q,j] be the pixel value at position (p,q) in channel j∈{r,g,b}. p and q represent the positions of pixels, p is the row index, which is an integer in [1,128]; q is the column index, which is an integer in [1,64]; j∈{r,g,b} is the RGB color channel index; specifically, I[p,q,r] represents the red channel of image I; I[p,q,g] represents the green channel; and I[p,q,b] represents the blue channel. Calculate the image I obtained in step S1 according to the following formula to extract the dominant RGB channel features of the image;
[0056]
[0057] in, Represents the maximum value of the three RGB channel values of the image at the (p, q) position; the calculated M[p, q] represents the value of the dominant RGB channel feature M at the (p, q) position.
[0058] The dominant RGB channel features can distinguish moiré patterns from high-frequency structures in normal images.
[0059] Step S22: using Gaussian high-pass filtering to extract high-frequency parts of the dominant RGB channel features of the image;
[0060] Step S221: first, the feature map M is converted to the frequency domain Y by a two-dimensional discrete Fourier transform as shown in formula (2);
[0061]
[0062] Among them, Y[u,v] represents the transformed frequency domain image; u represents the row index in the frequency domain, ranging from 0 to 128-1; v represents the column index in the frequency domain, ranging from 0 to 64-1; ω m ,ω n Represents the complex rotation factor in the two-dimensional discrete Fourier transform, which is used to calculate the frequency components in the frequency domain;
[0063] ω m =e -2πi / m ,
[0064] ω n =e -2πi / n .
[0065] Among them, e is a natural constant, i represents a unit complex number;
[0066] Step S222: Then, Gaussian high-pass filtering is used to reduce the low-frequency region in the frequency domain image Y, as shown in formula (3):
[0067]
[0068] Among them, Y′[u,v] represents the frequency domain image after high-pass filtering; σ is the standard deviation, which controls the width of the filter. According to experimental experience, σ=2 is taken;
[0069] Step S223: Finally, perform inverse Fourier transform on Y′ obtained in step S222 to obtain the high-frequency part HF(M) of the dominant RGB channel feature map M;
[0070] Step S23: In order to ensure the generalization of the multi-input convolutional neural network, the hue channel H and saturation channel S of the image are processed by Gaussian high-pass filtering using the method of step S22 to obtain their high-frequency parts HF(H) and HF(S), respectively; and since the bright part of the image is more likely to have moiré, the brightness channel V of the image is also a feature that needs to be considered;
[0071] Step S3: training a multi-input convolutional neural network;
[0072] Step S31: For training data According to step S2, the feature set is extracted Among them, M n It is picture I n The dominant RGB channel feature map, H n It is picture I nThe hue channel, S n It is picture I n Saturation channel, V n It is picture I n The lightness channel, HF(M n ),HF(H n ),HF(S n ) is M n ,H n ,S n The high-frequency feature map is obtained by Gaussian high-pass filtering. The extracted feature HF(M n ),HF(H n ),HF(S n ) and V n , input convolutional neural network; V n Through the convolution layer conv1, HF(M n ),HF(H n ),HF(S n ) pass through the convolutional layers conv2, conv3, and conv4 respectively. The Maxinum layer takes the maximum value of the convolution results of conv2, conv3, and conv4 by pixel. The Multyply layer multiplies the result of the Maxinum layer with the corresponding position of the convolution result of conv1. The result of the Multyply layer continues to pass through the convolutional layers conv5-conv7. Finally, the result of the convolutional layer conv7 is expanded to enter the fully connected layers FC1 and FC2;
[0073] The multi-input convolutional neural network has seven convolutional layers conv1-conv7, a Maximum layer for finding the maximum value, a Multyply layer for finding the multiplication of corresponding positions of the matrix, and two fully connected layers FC1 and FC2. The convolutional layers conv1-conv4 use 32 convolutional kernels of size 6×6 with a stride of 1 pixel. The following pooling layer has a stride of 2 pixels. The convolutional layer conv5 has 32 convolutional kernels of size 3×3 with a stride of 1 pixel; conv6-conv7 has 16 convolutional kernels of size 3×3 with a stride of 1 pixel. The activation function of the convolutional layers in the network is Relu, and both use maximum pooling. The fully connected layer FC1 has 16 neurons, and FC2 has 1 neuron and uses the softmax activation function;
[0074] Step S32: Use the cross entropy function to construct a loss function, as shown in formula (4):
[0075]
[0076] Among them, L represents the loss function; N represents the number of pictures; y n Indicates image I nThe label; G(.) represents the convolutional neural network, and the output of the network G(HF(M n ),HF(H n ),HF(S n ),V n ) has a value range of (0,1), which means I n is the probability of a moiré image;
[0077] Step S33: Input the feature image data into the neural network in batches of 64, and update the multi-input convolutional neural network parameters using the stochastic gradient descent method with a step size of 0.01 according to the loss function shown in formula (4), and train for 200 steps;
[0078] Step S4: Detect moiré patterns; specifically:
[0079] Step S41: according to step S2, extract the features of the image I to be tested, and obtain feature graphs HF(M), HF(H), HF(S), V;
[0080] Step S42: Input the feature map obtained in step S41 into the convolutional neural network G trained in step S3 to obtain the probability value G(HF(M), HF(H), HF(S), V) of whether moiré exists in the image to be tested:
[0081] If the probability value is greater than or equal to 0.5, it indicates that moiré exists, and the 128 / 4×64 / 4 region with the largest sum of HF(M) pixel values is calculated to be the region where moiré is most likely to occur.
[0082] If the probability value is less than 0.5, it means that there is no moiré.
[0083] The method was tested using 400 normal images and 600 moiré images in the VINmoire test set. The experiment was repeated five times and the average accuracy was 90.42%, which is higher than other existing methods. The accuracy rates of the existing Wavelet method, Peak method, and MDCNN method are 54.60%, 41.70%, and 77.61%, respectively.
[0084] The present invention deeply analyzes the formation mechanism of moiré patterns and observes the imbalance phenomenon of RGB color channels; based on this discovery, a unique dominant RGB channel feature extraction method is designed to effectively capture the characteristics of moiré patterns. In order to realize automatic moiré pattern detection, a deep convolutional neural network is designed and trained; combined with the dominant RGB channel feature extraction method, the moiré pattern in the image can be detected quickly and accurately. In extensive experimental verification, the present invention has achieved satisfactory results. Our achievements will introduce new ideas and solutions to the field of information security and provide more reliable image authentication and data protection methods.
[0085] The above-described embodiments merely express the implementation methods of the present invention, but they should not be understood as limiting the scope of the present invention. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A moiré detection method based on dominant RGB channel features, characterized in that: The moiré detection method comprises the following steps: Step S1: preprocessing the training data; Step S2: extracting features from the preprocessed data; Step S3: using the extracted feature images to train a multi-input convolutional neural network; Step S4: The image to be tested is processed by the same preprocessing and feature extraction method, and the feature image is input into a multi-input convolutional neural network to detect moiré patterns and obtain a detection result.
2. The moiré detection method based on dominant RGB channel features according to claim 1, characterized in that: The step S1 comprises the following steps: The image data is normalized and sampled to obtain a P×Q pixel image, the image has RGB channels and can be converted to the HSV color space to obtain its hue channel H, saturation channel S, and lightness channel V; the training data Includes N pictures and their labels, including moiré pictures and normal pictures. Set the label of the moiré picture to 1 and the label of the normal picture to 0.
3. The moiré detection method based on dominant RGB channel features according to claim 2, characterized in that: The step S2 comprises the following steps: Step S21: For any preprocessed image I, I[p,q,j] is recorded as the pixel value at position (p,q) in channel j∈{r,g,b}; wherein p and q represent the positions of pixels, p represents the row index, which is an integer in [1,P]; q represents the column index, which is an integer in [1,Q]; j∈{r,g,b} is the RGB color channel index; The image I obtained in step S1 is calculated according to the following formula to extract the dominant RGB channel features of the image; in, Represents the maximum value of the three RGB channel values of the image at the (p, q) position; the calculated M[p, q] represents the value of the dominant RGB channel feature map M at the (p, q) position; Distinguish moiré patterns from high-frequency structures in normal images by using dominant RGB channel features; Step S22: using Gaussian high-pass filtering to extract high-frequency parts of the dominant RGB channel features of the image; Step S23: In order to ensure the generalization of the multi-input convolutional neural network, the hue channel H and saturation channel S of the image are processed by Gaussian high-pass filtering using the method of step S22 to obtain their high-frequency parts HF(H) and HF(S), respectively; and because the bright parts of the image are more likely to have moiré, the brightness channel V of the image is also a feature that needs to be considered.
4. The moiré detection method based on dominant RGB channel features according to claim 3, characterized in that: The step S22 comprises the following steps: Step S221: converting the feature map M into the frequency domain Y by a two-dimensional discrete Fourier transform as shown in formula (2); Among them, Y[u,v] represents the transformed frequency domain image; u represents the row index in the frequency domain, ranging from 0 to P-1; v represents the column index in the frequency domain, ranging from 0 to Q-1; ω m ,ω n Represents the complex rotation factor in the two-dimensional discrete Fourier transform, which is used to calculate the frequency components in the frequency domain; oh m =e -2πi / m , oh n =e -2πi / n . Among them, e is a natural constant, i represents a unit complex number; Step S222: Use Gaussian high-pass filtering to reduce the low-frequency region in the frequency domain image Y, as shown in formula (3): Among them, Y′[u,v] represents the frequency domain image after high-pass filtering; σ is the standard deviation, which controls the width of the filter. According to experimental experience, σ=2 is taken; Step S223: Perform an inverse Fourier transform on Y′ obtained in step S222 to obtain the high-frequency part HF(M) of the dominant RGB channel feature map M.
5. The moiré detection method based on dominant RGB channel features according to claim 3, characterized in that: The step S3 comprises the following steps: Step S31: For training data According to step S2, the feature set is extracted Among them, M n It is picture I n The dominant RGB channel feature map, H n It is picture I n The hue channel, S n It is picture I n Saturation channel, V n It is picture I n The lightness channel, HF(M n ),HF(H n ),HF(S n ) is M n ,H n ,S n The high-frequency feature map is obtained by Gaussian high-pass filtering; the extracted feature HF (M n ),HF(H n ),HF(S n ) and V n , input into the multi-input convolutional neural network; Step S32: Use the cross entropy function to construct a loss function, as shown in formula (4): Among them, L represents the loss function; N represents the number of pictures; y n Indicates image I n The label; G(.) represents the convolutional neural network, and the output of the network G(HF(M n ),HF(H n ),HF(S n ),V n ) has a value range of (0,1), which means I n is the probability of a moiré image; Step S33: Input the feature image data into the multi-input convolutional neural network, and use the stochastic gradient descent method to update the multi-input convolutional neural network parameters according to the loss function shown in formula (4), and perform training to obtain a trained multi-input convolutional neural network G.
6. The moiré detection method based on dominant RGB channel features according to claim 3, characterized in that: In step S31, the multi-input convolutional neural network has seven convolutional layers conv1-conv7, a Maximum layer for finding the maximum value, a Multyply layer for finding the multiplication of corresponding positions of the matrix, and two fully connected layers FC1 and FC2.
7. The moiré detection method based on dominant RGB channel features according to claim 6, characterized in that: The characteristic HF(M n ),HF(H n ),HF(S n ) and V n After inputting the convolutional neural network, V n Through the convolution layer conv1, HF(M n ),HF(H n ),HF(S n ) pass through the convolutional layers conv2, conv3, and conv4 respectively; the Maximum layer of the convolutional neural network takes the maximum value of the convolution results of conv2, conv3, and conv4 by pixel; the Multyply layer of the convolutional neural network multiplies the result of the Maximum layer with the corresponding position of the convolution result of conv1; the result of the Multyply layer continues to pass through the convolutional layers conv5-conv7; finally, the result of the convolutional layer conv7 is expanded to enter the fully connected layers FC1 and FC2.
8. The moiré detection method based on dominant RGB channel features according to claim 6, characterized in that: The activation functions of the convolutional layers are all Relu, and both use maximum pooling; the fully connected layer FC1 has 16 neurons, and FC2 has 1 neuron and uses a softmax activation function.
9. The moiré detection method based on dominant RGB channel features according to claim 6, characterized in that: The step S4 comprises the following steps: Step S41: according to step S2, extract the features of the image I to be tested, and obtain feature graphs HF(M), HF(H), HF(S), V; Step S42: Input the feature map obtained in step S41 into the multi-input convolutional neural network G trained in step S3 to obtain the probability value G(HF(M), HF(H), HF(S), V) of whether moiré patterns exist in the image to be tested, and obtain the detection result based on the probability value.
10. The moiré detection method based on dominant RGB channel features according to claim 6, characterized in that: In step S42: If the probability value is greater than or equal to 0.5, it means that moiré exists. The P / 4×Q / 4 area with the largest sum of HF(M) pixel values is the area most likely to have moiré. If the probability value is less than 0.5, it means that there is no moiré.