Median filtering detection method, device and equipment of image and storage medium
By performing high effective bit difference analysis and Markov chain feature extraction on the image, the problem of information loss in existing detection methods is solved, and more efficient median filtering detection is achieved.
Patent Information
- Application Number
- CN202210635128.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-06
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2042-06-06
AI Technical Summary
Existing image median filtering detection methods tend to lose important statistical information, resulting in poor detection performance.
By performing differential analysis on the most significant bits of the target image, a Markov chain is extracted to generate the target feature vector. Then, a support vector machine and a linear discriminant analysis model are used to detect whether the image has undergone median filtering.
It improves the performance of median filtering detection, reduces information loss, and enhances detection accuracy.
Smart Images

Figure CN117237262B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and particularly relates to a median filtering detection method and device of an image, an image processing device and a storage medium. BACKGROUND
[0002] With the wide application of digital imaging devices and image editing software, the operability of editing images is increasingly popularized, and thus a large number of edited images exist, many of which contain misleading false information. In order to make the forged images more realistic, the forgers usually hide the traces of image modification by using various operations, wherein the filtering operations such as median filtering, Gaussian filtering and mean filtering seriously affect the detection performance of the forged images. In particular, the median filtering is the first choice of many forgers to hide the traces of image modification due to its nonlinear filtering characteristics based on order statistics. At present, the existing method for detecting whether an image is processed by median filtering is prone to losing important statistical information, resulting in poor detection performance. SUMMARY
[0003] The present application provides a median filtering detection method and device of an image, an image processing device and a storage medium, to solve the technical problem that the existing method for detecting whether an image is processed by median filtering is prone to losing important statistical information, resulting in poor detection performance.
[0004] In a first aspect, the present application provides a median filtering detection method of an image, comprising:
[0005] obtaining a target image to be detected, performing differential analysis on high significant bits of the target image, and obtaining high bit features of the target image;
[0006] extracting a Markov chain of the high bit features, obtaining a target feature vector of the target image according to the Markov chain;
[0007] detecting whether the target image exists median filtering processing according to the target feature vector.
[0008] In one embodiment, the high bit features include a change matrix, and the step of performing differential analysis on the high significant bits of the target image and obtaining the high bit features of the target image comprises:
[0009] generating a high bit pixel matrix of the target image according to pixel values of pixel points of the target image;
[0010] performing differential analysis on the target image based on the high bit pixel matrix, and obtaining a change matrix of the target image.
[0011] In one embodiment, the change matrix includes a differential change matrix and a separation differential change matrix, the step of performing differential analysis on the target image based on the high-bit pixel matrix to obtain the change matrix of the target image includes:
[0012] performing differential processing on the high-bit pixel matrix to obtain a pixel differential matrix corresponding to the high-bit pixel matrix and a separation pixel differential matrix;
[0013] obtaining a preset differential threshold, calculating a differential threshold matrix of the pixel differential matrix and a separation threshold matrix of the separation pixel differential matrix according to the differential threshold;
[0014] obtaining an element change relationship of the differential threshold matrix and the separation threshold matrix, and generating a differential change matrix and a separation change matrix of the target image according to the element change relationship.
[0015] In one embodiment, the pixel differential matrix includes a horizontal differential matrix, a vertical differential matrix, a main diagonal differential matrix and a sub-diagonal differential matrix, and the separation pixel differential matrix includes a separation horizontal differential matrix, a separation vertical differential matrix, a separation main diagonal differential matrix and a separation sub-diagonal differential matrix.
[0016] In one embodiment, the change matrix further includes a Laplace change matrix, and the step of performing differential analysis on the target image based on the high-bit pixel matrix to obtain the change matrix of the target image further includes:
[0017] constructing a Laplace operator based on the target image;
[0018] performing differential processing on the high-bit pixel matrix according to the Laplace operator to obtain a Laplace differential matrix corresponding to the target image;
[0019] generating a Laplace change matrix of the target image according to the Laplace differential matrix.
[0020] In one embodiment, the step of extracting the Markov chain of the high-bit feature to obtain the target feature vector of the target image includes:
[0021] extracting the Markov chain of the high-bit feature based on the change matrix;
[0022] calculating the average value of the feature vector corresponding to the Markov chain to obtain the target feature vector of the target image.
[0023] In one embodiment, the step of obtaining the target image to be detected includes:
[0024] acquire a to-be-processed original image, and detect size information of the original image;
[0025] crop the original image into a preset size according to the size information, to obtain a target image to be detected.
[0026] In a second aspect, an embodiment of the present application provides an image median filter detection device, comprising:
[0027] a high-bit analysis module, configured to acquire a target image to be detected, perform differential analysis on high significant bits of the target image, and acquire high-bit features of the target image;
[0028] a feature analysis module, configured to extract a Markov chain of the high-bit features, and acquire a target feature vector of the target image according to the Markov chain;
[0029] an image detection module, configured to detect whether the target image has a median filter processing according to the target feature vector.
[0030] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory storing a computer program, wherein the processor implements steps of the image median filter detection method of the first aspect when executing the program.
[0031] In a fourth aspect, an embodiment of the present application provides a non-transitory computer storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement steps of the image median filter detection method of the first aspect.
[0032] The image median filter detection method, device, equipment and storage medium provided by the embodiment of the present application can extract features of a target image through high significant bit differential analysis and Markov chain, use pixel change information of a high significant bit image, effectively prevent information loss, and generate more fine-grained features, thereby improving detection performance of a median filter processing. BRIEF DESCRIPTION OF DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the present application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0034] Figure 1 is one of the flowcharts of the image median filter detection method provided by the embodiment of the present application;
[0035] Figure 2is a structural schematic diagram of a median filter detection device for an image provided by an embodiment of the present application;
[0036] Figure 3 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0037] For the purpose, technical solutions and advantages of the present application to be clearer, the technical solutions in the present application will be described clearly and completely below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without any creative work fall within the scope of protection of the present application.
[0038] Figure 1 is one of flowcharts of a median filter detection method for an image provided by an embodiment of the present application. Referring to Figure 1 The median filter detection method for an image provided by an embodiment of the present application can include:
[0039] In step 100, a target image to be detected is acquired, and a high significant bit of the target image is differentially analyzed to acquire a high-bit feature of the target image.
[0040] The median filter detection method for an image provided by the present embodiment can be used to detect whether the image has traces of median filter processing, so as to preliminarily judge whether the image is tampered with, and can be used for preliminary screening of a fake image. Specifically, first, a target image to be detected is acquired, and then a high significant bit of the target image is differentially analyzed to obtain a feature of the high significant bit of the target image, i.e., a high-bit feature. By discarding the least significant bit of each pixel in the target image and only considering the higher significant bits, the image is converted into an image based on the higher significant bits, and the generated image contains more relevant information within a certain range, which is helpful to generate more valuable information than the target image in subsequent processing. When the high significant bit of the target image is differentially analyzed, the high eight-bit image and / or the high four-bit image of the target image can be analyzed, and on this basis, further analysis of other high significant bit images of the target image can be combined, which is not specifically limited here.
[0041] Further, in step 100, the step of acquiring the target image to be detected can further include:
[0042] In step 101, an original image to be processed is acquired, and size information of the original image is detected.
[0043] In step 102, the original image is cropped to a preset size according to the size information to obtain a target image to be detected.
[0044] An original image to be processed is acquired, size information of the original image is detected, the original image is cropped according to the detected size information, the original image is cropped into an image of a preset size, and a target image to be detected is obtained. The preset size during the cropping of original images of different sizes can be the same or different. During the cropping, the central part of the original image is mainly intercepted, so as to eliminate the filling artifacts, reduce the influence of the filling artifacts on the detection result, and improve the detection accuracy.
[0045] In step 200, a Markov chain of the high-bit feature is extracted, and a target feature vector of the target image is obtained according to the Markov chain.
[0046] After the high-bit analysis of the target image and the high-bit feature is obtained, the Markov chain of the high-bit feature is extracted. The high effective bit of the target image is used for strong statistical analysis. By reducing the bit depth, the extracted Markov chain can contain more statistical information related to the high-bit feature, so as to further improve the detection accuracy. According to the extracted Markov chain, a target feature vector of the target image is obtained. The extracted Markov chain is also in the form of a feature vector. The target feature vector corresponding to the Markov chain is processed, so as to obtain a target feature vector that can be used to detect whether the target image exists median filtering processing. Further, the extracted Markov chain can be first-order, second-order or higher-order, which can be determined according to actual conditions and is not limited herein.
[0047] In step 300, whether the target image exists median filtering processing is detected according to the target feature vector.
[0048] After the target feature vector of the target image is obtained, whether the target image exists median filtering processing is detected according to the target feature vector. After the median filtering detection of the target image is performed according to the target feature vector, a detection result is output. According to the detection result, if the target image exists median filtering processing, a warning prompt information can also be output. When the median filtering detection of the target image is performed according to the target feature vector, a pre-trained detection model can be used. The detection model is, for example, a support vector machine and a linear discriminant analysis model. First, the target feature vector is projected and classified by using the linear discriminant analysis model. Then, based on the classification result of the linear discriminant analysis model, whether the target image exists median filtering processing is detected by using the support vector machine. It can be understood that the detection model provided in the embodiments of the present application is not limited to this, and will not be described herein.
[0049] In the embodiments, the high effective bit analysis and the Markov chain are used for feature extraction of the target image. The high effective bit analysis can change the information of the image in pixels, can effectively prevent information loss, and can produce finer-grained features, so as to improve the detection performance of the median filtering processing.
[0050] Further, the original image is cropped according to a preset size to intercept the main information of the central part of the original image, so that the filling artifact can be eliminated, the influence on the median filter detection can be reduced, the detection performance can be further improved, and it is helpful to more accurately detect whether the target image is subjected to the median filter processing.
[0051] In one embodiment, the step 100 can further include:
[0052] In step 110, a high-bit pixel matrix of the target image is generated according to pixel values of pixel points of the target image.
[0053] In step 120, a change matrix of the target image is obtained by performing differential analysis on the target image based on the high-bit pixel matrix.
[0054] In the high-significant-bit analysis of the target image, the high-bit pixel matrix of the target image is generated according to the pixel values of the pixel points of the target image. Specifically, the high-significant bits of the pixel values of the target image are extracted to form the high-bit pixel matrix. The differential analysis of the high-significant bits is performed based on the high-bit pixel matrix, the pixel change information of the target image is determined, and the change matrix of the target image is obtained.
[0055] Further, the change matrix of the target image includes a differential change matrix and a separate differential change matrix, and the step 120 can further include:
[0056] In step 121, a pixel differential matrix corresponding to the high-bit pixel matrix and a separate pixel differential matrix are obtained by performing differential processing on the high-bit pixel matrix.
[0057] In step 122, a preset differential threshold is obtained, a differential threshold matrix of the pixel differential matrix and a separate threshold matrix of the separate pixel differential matrix are calculated according to the differential threshold.
[0058] In step 123, an element change relationship of the differential threshold matrix and the separate threshold matrix is obtained, and a differential change matrix and a separate change matrix of the target image are generated according to the element change relationship.
[0059] The pixel values of the target image are subjected to difference processing based on the high-bit pixel matrix to obtain a pixel difference matrix corresponding to the high-bit pixel matrix and a separated pixel difference matrix corresponding to the high-bit pixel matrix. The pixel difference matrix includes a horizontal difference matrix, a vertical difference matrix, a main diagonal difference matrix and a sub-diagonal difference matrix, and the separated pixel difference matrix includes a separated horizontal difference matrix, a separated vertical difference matrix, a separated main diagonal difference matrix and a separated sub-diagonal difference matrix. A preset difference threshold is obtained, and the pixel difference matrix and the separated pixel difference matrix are subjected to threshold processing based on the preset difference threshold to obtain a corresponding threshold matrix, which includes a difference threshold matrix and a separated threshold matrix. The change relationship of the elements in the threshold matrix is analyzed to generate a change matrix of the target image, which shows the change of the matrix element values, including a difference change matrix corresponding to the difference matrix in each direction of the pixel difference matrix and a separated change matrix corresponding to the separated difference matrix in each direction of the separated pixel difference matrix. It should be noted that the difference thresholds of the pixel difference matrix and the separated pixel difference matrix can be the same or different, and the difference thresholds of the pixel difference matrix or the separated pixel difference matrix in different directions can be the same or different, which is not limited here.
[0060] Further, the specific process of threshold processing is that when the value of an element of the pixel difference matrix is greater than or equal to the difference threshold, the value of the corresponding element in the threshold matrix is the difference threshold, and the sign remains unchanged; when the value of the element of the pixel difference matrix is less than the difference threshold, the value of the corresponding element in the threshold matrix is the value of the element of the pixel difference matrix, and the sign remains unchanged. That is, under the premise that the sign remains unchanged, the smaller value between the value of the element in the pixel difference matrix and the difference threshold is taken as the element value at the corresponding position in the threshold matrix.
[0061] The pixel difference matrix and the separated pixel difference matrix can be first-order or higher-order. For the sake of illustration, the first-order pixel difference matrix and the first-order separated pixel difference matrix are taken as examples. The pixel difference matrix of the target image I is shown in the following formulas 1 to 4:
[0062]
[0063]
[0064]
[0065]
[0066] wherein p, q represent the position of a pixel point in the target image, I p,q represents the pixel value of the pixel point, formula 1 represents the horizontal difference matrix, formula 2 represents the vertical difference matrix, formula 3 represents the main diagonal difference matrix, and formula 4 represents the sub-diagonal difference matrix.
[0067] For example, in the vertical direction, the calculation of the vertical difference matrix in the pixel difference matrix for the target image I can be expressed as:
[0068]
[0069] wherein, represents an element in the vertical difference matrix.
[0070] The combination of the second-order or higher-order pixel difference array can increase the detection accuracy. In the case of an 8-bit image, the second-order pixel difference matrix contains a range from -510 to 510, because the range of the matrix elements is higher than that of the first-order. Compared with the first-order pixel difference matrix, threshold processing can lose more information in the second-order pixel difference matrix. Therefore, a separate pixel difference matrix providing additional information and having an element range of -255 to 255 can be used instead of the second-order pixel difference matrix. Also, for example, in the vertical direction, the calculation of the separate pixel difference matrix in the vertical direction, i.e., the separate vertical difference matrix, for the target image I can be expressed as:
[0071]
[0072] In formula 6, represents an element in the separate vertical matrix. The separate pixel difference matrix of the target image I calculated based on formula 6 is shown in the following formulas 7 to 10:
[0073]
[0074]
[0075]
[0076]
[0077] For example, in the horizontal direction, the high significant bit analysis of a target image I of 5*5 size and 8-bit depth is performed from an 8-bit original image. Assuming that the preset difference threshold of the horizontal difference matrix of the target image I is 3, the process of the high significant bit analysis of the target image I is shown in the following formulas 11 to 14:
[0078]
[0079]
[0080]
[0081]
[0082] In the formula 11, it is the high bit pixel matrix of the target image I, in the formula 12, it is the horizontal difference matrix of the target image I, the difference direction is from left to right, in the formula 13, it is the threshold matrix corresponding to the horizontal difference matrix of the target image I, in the formula 14, it is the change matrix corresponding to the horizontal difference matrix of the target image I. In the threshold matrix shown in the formula 13, the initial three matrix element values in the first row are all -3, no change, so the corresponding element value in the change matrix is 0. The fourth value in the first row of the threshold matrix is 3, which means that the matrix element value changes from -3 to 3, so the corresponding element value in the change matrix is 1, indicating that the corresponding element value in the threshold matrix has changed. According to this rule, the change relationship of each row element value in the threshold matrix is analyzed to obtain the change matrix shown in the formula 14.
[0083] Further, the high four bits of the above-mentioned 8-bit original image are taken to form an image with a size of 5*5 and a bit depth of 4, and the same high effective bit analysis is performed on it, and the specific process is as follows:
[0084] The formulas 15 to 18 are shown as follows:
[0085]
[0086]
[0087]
[0088]
[0089] In the formula 15, it is the high bit pixel matrix of the target image, which is the high four bit image, in the formula 16, it is the horizontal difference matrix of the high four bit image, in the formula 17, it is the threshold matrix corresponding to the horizontal difference matrix of the high four bit image, in the formula 18, it is the change matrix corresponding to the horizontal difference matrix of the high four bit image.
[0090] According to the formulas 14 and 18, it can be seen that the threshold matrix and the change matrix show better changes on the high four-bit image, and thus the features obtained by the statistical analysis on the high four-bit image can improve the detection accuracy of the median filtering. It should be noted that the formulas 11 to 18 give the difference analysis process of the horizontal high effective bit, and the difference direction is from left to right. In actual application, the difference direction can also be from right to left, or the horizontal difference matrix can include the matrices of the two difference directions from left to right and from right to left, wherein the matrices of the two difference directions are inverse difference matrices. Similarly, the vertical difference matrix can also include the matrices of the two difference directions from top to bottom and / or from bottom to top, the main diagonal difference matrix can include the matrices of the two difference directions from the top-left corner to the bottom-right corner and / or from the bottom-right corner to the top-left corner, and the secondary diagonal difference matrix can include the matrices of the two difference directions from the top-right corner to the bottom-left corner and / or from the bottom-left corner to the top-right corner. The difference analysis of the high effective bit based on the pixel difference matrix and the separated pixel difference matrix of different difference directions can also obtain more change matrices corresponding to the difference directions, and details are not described herein.
[0091] Further, the change matrix of the target image further includes a Laplace change matrix, and the Laplace change matrix is obtained according to a Laplace difference matrix of the target image. Specifically, the step 120 can further include:
[0092] Step 124, constructing a Laplace operator based on the target image;
[0093] Step 125, performing difference processing on the high-bit pixel matrix according to the Laplace operator to obtain a Laplace difference matrix corresponding to the target image;
[0094] Step 126, generating a Laplace change matrix of the target image according to the Laplace difference matrix.
[0095] The Laplace operator is constructed based on the target image to be detected, and the Laplace operator is shown in, for example, formulas 19 or 20:
[0096]
[0097]
[0098] In addition to the first-order and separate pixel difference matrix in the horizontal, vertical, main diagonal and secondary diagonal directions, the Laplace operator can clearly highlight the mutation of pixel values and provide combined statistical information of horizontal and vertical neighborhoods, thus providing better statistical information. Each difference matrix can provide statistical information related to the target image, so extracting features from the pixel difference matrix in the vertical, horizontal, diagonal, secondary diagonal direction, the separate pixel difference matrix and the Laplace difference matrix in the high bit image helps to obtain better detection performance.
[0099] The Laplace operator shown in the above formulas 19 and 20 is only used for exemplary illustration, and in actual construction of the Laplace operator, different Laplace operators can be constructed according to the image information to be detected or according to the features to be extracted according to the actual detection requirements, which are not specifically limited here. According to the constructed Laplace operator, the high bit pixel matrix of the target image is subjected to difference processing to obtain the Laplace difference matrix of the target image, the Laplace difference matrix is subjected to threshold processing based on a preset difference threshold to obtain a corresponding threshold matrix, and then the corresponding Laplace change matrix of the target image is analyzed according to the change relationship of the elements in the threshold matrix.
[0100] Further, the step 200 can further include:
[0101] Step 201, extracting a Markov chain of the high bit feature based on the change matrix;
[0102] Step 202, calculating the average value of the feature vector corresponding to the Markov chain to obtain a target feature vector of the target image.
[0103] The high bit feature extracted from the high significant bit analysis is a Markov chain extracted from the change matrix corresponding to the difference matrix in the horizontal, vertical, diagonal, secondary diagonal and other directions of the target image. The extracted Markov chain can be first-order, second-order or higher-order, which can be selected according to the requirement for detection accuracy. The following takes the second-order Markov chain as an example for illustration. Similarly, taking the vertical direction as an example, before extracting the second-order Markov chain, the definition of the first-order Markov chain is as shown in the following formula 21:
[0104]
[0105] When , x α,β = 0, the second-order Markov chain of the vertical first-order pixel difference matrix can be defined as follows:
[0106]
[0107] wherein:
[0108] a, b, g e {-G, -G+1,... 0,... G-1, G} (23)
[0109] When χ α,β,γ = 0, G is a difference threshold.
[0110] Taking the pixel difference matrixes in the horizontal, vertical, main diagonal and sub-diagonal directions, the separated pixel difference matrix and the Laplace difference matrix as examples, the second-order Markov chains are extracted from the corresponding change matrixes, and nine corresponding feature vectors are obtained, which are represented by Ω1, Ω2, Ω3, Ω4, Ω5, Ω6, Ω7, Ω8 and Ω9. Ω1-Ω8 are the Markov chains in the horizontal, vertical, main diagonal and sub-diagonal directions, and Ω9 is the Markov chain corresponding to the Laplace change matrix. The average values of the extracted Markov chain corresponding feature vectors are calculated, and the change characteristics of the flipping and mirroring operations are normalized to obtain the target feature vectors that can be used for detection.
[0111] wherein the dimensions of the change matrixes corresponding to the difference matrixes in different directions are different, the feature vectors obtained by extracting the Markov chains are different, and when calculating the average values, the dimensions of the feature vectors in different directions need to be considered. Based on the change characteristics of the flipping and mirroring operations in the vertical and horizontal directions, the calculation formula of the average values of the Markov chain corresponding feature vectors is as follows:
[0112]
[0113] Based on the change characteristics of the flipping and mirroring operations in the main diagonal and sub-diagonal directions, the average values of the Markov chain corresponding feature vectors are calculated by the following formula 25:
[0114]
[0115] The calculation of the average values is performed in the manner shown in formulas 24-25, the flipping and mirroring operations are normalized to obtain the corresponding target feature vectors, and the median filtering detection based on the target feature vectors can reduce the influence of the flipping and mirroring operations and improve the detection accuracy.
[0116] In this embodiment, the Markov chain extracts global features, and uses high four-bit images to highlight the change information of pixels, making up for the missing feature information of the threshold matrix, thereby refining the granularity of the features. At the same time, by calculating the average values of the extracted Markov chains, the flipping and mirroring operations are normalized to reduce the influence on the median filtering detection, thereby improving the detection accuracy.
[0117] The image median filter detection device provided in the embodiments of the present application is described below, and the image median filter detection device described below can be correspondingly referred to the image median filter detection method described above.
[0118] With reference to Figure 2 The image median filter detection device provided in the embodiments of the present application comprises:
[0119] The high bit analysis module 10 is configured to acquire a target image to be detected, perform differential analysis on high significant bits of the target image, and acquire high bit features of the target image.
[0120] The feature analysis module 20 is configured to extract a Markov chain of the high bit features, and obtain a target feature vector of the target image according to the Markov chain.
[0121] The image detection module 30 is configured to detect whether the target image is subjected to median filter processing according to the target feature vector.
[0122] In one embodiment, the high bit analysis module 10 is further configured to:
[0123] generate a high bit pixel matrix of the target image according to pixel values of pixel points of the target image;
[0124] perform differential analysis on the target image based on the high bit pixel matrix, and obtain a change matrix of the target image.
[0125] In one embodiment, the change matrix comprises a differential change matrix and a separate differential change matrix, and the high bit analysis module 10 is further configured to:
[0126] perform differential processing on the high bit pixel matrix to obtain a pixel differential matrix corresponding to the high bit pixel matrix and a separate pixel differential matrix;
[0127] acquire a preset differential threshold, calculate a differential threshold matrix of the pixel differential matrix and a separate threshold matrix of the separate pixel differential matrix according to the differential threshold;
[0128] acquire an element change relationship of the differential threshold matrix and the separate threshold matrix, and generate a differential change matrix and a separate change matrix of the target image according to the element change relationship.
[0129] In one embodiment, the pixel differential matrix comprises a horizontal differential matrix, a vertical differential matrix, a main diagonal differential matrix and a secondary diagonal differential matrix, and the separate pixel differential matrix comprises a separate horizontal differential matrix, a separate vertical differential matrix, a separate main diagonal differential matrix and a separate secondary diagonal differential matrix.
[0130] In one embodiment, the change matrix further comprises a Laplacian change matrix, and the high-bit analysis module 10 is further configured to:
[0131] constructing a Laplacian operator based on the target image;
[0132] differentially processing the high-bit pixel matrix according to the Laplacian operator to obtain a Laplacian differential matrix corresponding to the target image;
[0133] generating a Laplacian change matrix of the target image according to the Laplacian differential matrix.
[0134] In one embodiment, the high-bit analysis module 10 is further configured to:
[0135] obtaining an original image to be processed, and detecting size information of the original image;
[0136] cropping the original image to a preset size according to the size information to obtain a target image to be detected.
[0137] In one embodiment, the feature analysis module 20 is further configured to:
[0138] extracting a Markov chain of the high-bit feature based on the change matrix;
[0139] calculating an average value of a feature vector corresponding to the Markov chain to obtain a target feature vector of the target image.
[0140] Figure 3 An example of a schematic diagram of an entity structure of an electronic device is shown in Figure 3 The electronic device can include a processor 310, a communication interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 can communicate with each other through the communication bus 340. The processor 310 can invoke a computer program in the memory 330 to execute the steps of the median filter detection method of the image, for example, including:
[0141] obtaining a target image to be detected, differentially analyzing high significant bits of the target image, and obtaining high-bit features of the target image;
[0142] extracting a Markov chain of the high-bit feature, and obtaining a target feature vector of the target image according to the Markov chain;
[0143] detecting whether the target image exists median filter processing according to the target feature vector.
[0144] Moreover, the logic instructions in the memory 330 described above can be implemented in the form of software functional units and sold or used as independent products, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, etc.
[0145] In another aspect, the embodiments of the present application also provide a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program is executed by a processor, so that the computer can execute the steps of the median filtering detection method of the image provided by the above-mentioned embodiments, for example, comprising:
[0146] obtaining a target image to be detected, performing differential analysis on the high significant bits of the target image, and obtaining high bit features of the target image;
[0147] extracting a Markov chain of the high bit features, and obtaining a target feature vector of the target image according to the Markov chain;
[0148] detecting whether the target image exists median filtering processing according to the target feature vector.
[0149] In another aspect, the embodiments of the present application also provide a processor readable storage medium, which stores a computer program, and the computer program is used to make the processor execute the steps of the method provided by the above-mentioned embodiments, for example, comprising:
[0150] obtaining a target image to be detected, performing differential analysis on the high significant bits of the target image, and obtaining high bit features of the target image;
[0151] extracting a Markov chain of the high bit features, and obtaining a target feature vector of the target image according to the Markov chain;
[0152] detecting whether the target image exists median filtering processing according to the target feature vector.
[0153] The processor-readable storage medium can be any available medium or data storage device that a processor can access, including but not limited to a magnetic storage (e.g., floppy disk, hard disk, tape, MO, etc.), an optical storage (e.g., CD, DVD, BD, HVD, etc.), and a semiconductor storage (e.g., ROM, EPROM, EEPROM, NAND FLASH, SSD, etc.), etc.
[0154] The apparatus embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment scheme according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0155] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be realized by means of software and necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of software product, which can be stored in a computer readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including a plurality of instructions to make a computer device (which can be a personal computer, server, or network device, etc.) execute the method described in each embodiment or some part of the embodiment.
[0156] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A median filtering detection method for images, characterized in that, Includes the following steps: Acquire the target image to be detected, perform differential analysis on the most significant bits of the target image, and obtain the high-bit features of the target image; Extract the Markov chain of the high-order features, and obtain the target feature vector of the target image based on the Markov chain; Detect whether the target image has undergone median filtering based on the target feature vector; The high-order features include a transformation matrix. The step of acquiring the target image to be detected, performing differential analysis on the most significant bits of the target image, and obtaining the high-order features of the target image includes: Acquire the target image to be detected, extract the most significant bits of the target image, and convert the target image into a high four-bit image; Generate the high-bit pixel matrix of the high-bit image based on the pixel values of the pixels in the high-bit image; Based on the high-bit pixel matrix, differential analysis is performed on the high-four-bit image to obtain the transformation matrix of the high-four-bit image; wherein, the transformation matrix includes a differential transformation matrix, a separate differential transformation matrix, and a Laplacian transformation matrix.
2. The image median filtering detection method according to claim 1, characterized in that, The step of performing difference analysis on the high-four-bit image based on the high-bit pixel matrix to obtain the transformation matrix of the high-four-bit image includes: The high-order pixel matrix is subjected to differential processing to obtain the pixel difference matrix and the separated pixel difference matrix corresponding to the high-order pixel matrix; Obtain a preset difference threshold, and calculate the difference threshold matrix of the pixel difference matrix and the separation threshold matrix of the separated pixel difference matrix based on the difference threshold. Obtain the element change relationship between the difference threshold matrix and the separation threshold matrix, and generate the difference change matrix and separation change matrix of the high four-bit image based on the element change relationship.
3. The image median filtering detection method according to claim 2, characterized in that, The pixel difference matrix includes a horizontal difference matrix, a vertical difference matrix, a main diagonal difference matrix, and a secondary diagonal difference matrix, and the separated pixel difference matrix includes a separated horizontal difference matrix, a separated vertical difference matrix, a separated main diagonal difference matrix, and a separated secondary diagonal difference matrix.
4. The image median filtering detection method according to claim 2, characterized in that, The step of performing difference analysis on the high-four-bit image based on the high-bit pixel matrix to obtain the transformation matrix of the high-four-bit image further includes: Construct a Laplacian operator based on the high four-bit image; The high-bit pixel matrix is differentially processed using the Laplacian operator to obtain the Laplacian difference matrix corresponding to the high four-bit image. The Laplacian transformation matrix of the high four-bit image is generated based on the Laplacian difference matrix.
5. The image median filtering detection method according to claim 1, characterized in that, The step of extracting the Markov chain of the high-order features to obtain the target feature vector of the target image includes: Based on the transformation matrix, a Markov chain is extracted for the high-order features; The average value of the feature vectors corresponding to the Markov chain is calculated to obtain the target feature vector of the target image.
6. The image median filtering detection method according to claim 1, characterized in that, The step of acquiring the target image to be detected includes: Acquire the original image to be processed and detect the size information of the original image; The original image is cropped to a preset size based on the size information to obtain the target image to be detected.
7. A median filtering detection device for an image, characterized in that, include: The high-level analysis module is used to acquire the target image to be detected, perform differential analysis on the high significant bits of the target image, and obtain the high-level features of the target image. The feature analysis module is used to extract the Markov chain of the high-order features and obtain the target feature vector of the target image based on the Markov chain. The image detection module is used to detect whether the target image has undergone median filtering based on the target feature vector; The high-level features include a transformation matrix, and the high-level analysis module is specifically used for: Acquire the target image to be detected, extract the most significant bits of the target image, and convert the target image into a high four-bit image; Generate the high-bit pixel matrix of the high-bit image based on the pixel values of the pixels in the high-bit image; Based on the high-bit pixel matrix, differential analysis is performed on the high-four-bit image to obtain the transformation matrix of the high-four-bit image; wherein, the transformation matrix includes a differential transformation matrix, a separate differential transformation matrix, and a Laplacian transformation matrix.
8. An electronic device comprising a processor and a memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the median filtering detection method for images according to any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the median filtering detection method for images according to any one of claims 1 to 6.
Citation Information
Patent Citations
Slot-cutting evidence obtaining method based on LBP and extended Markov features
CN107977964A
Method and device for coding and decoding images, their programs, and their program record media
JP2004356960A