CN114554188A - Mobile phone camera detection method and device based on image sensor pixel array - Google Patents

Mobile phone camera detection method and device based on image sensor pixel array Download PDF

Info

Publication number
CN114554188A
CN114554188A CN202210170072.5A CN202210170072A CN114554188A CN 114554188 A CN114554188 A CN 114554188A CN 202210170072 A CN202210170072 A CN 202210170072A CN 114554188 A CN114554188 A CN 114554188A
Authority
CN
China
Prior art keywords
image
target
detection
camera
acquiring
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
CN202210170072.5A
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.)
Shenzhen Shanhui Technology Co ltd
Original Assignee
Shenzhen Shanhui Technology 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 Shenzhen Shanhui Technology Co ltd filed Critical Shenzhen Shanhui Technology Co ltd
Priority to CN202210170072.5A priority Critical patent/CN114554188A/en
Publication of CN114554188A publication Critical patent/CN114554188A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/24Arrangements for testing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Quality & Reliability (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a mobile phone camera detection method based on an image sensor pixel array, which is characterized in that the characteristics of a target camera area or a gray level step in an image before and after the active irradiation of an external infrared light source are obtained to realize the target detection and obtain an input image, the input image is preprocessed to improve the signal-to-noise ratio of the image, a suspicious target seed point is obtained by using a target segmentation algorithm of a histogram and an image entropy, a complete highlight area is obtained, the discrimination of a suspicious target is screened by discriminating the target through a feature descriptor of the target camera, the repeated detection condition of the target is determined through a detection clustering algorithm, and the detection result is displayed in an RGB color image. Changing the shape of the target mask reduces the accuracy of later stage feature analysis and calculation, affecting the final target decision. The fact that the re-detection targets are necessarily close in physical distance is utilized, the judgment results are clustered, the situation of repeated detection of the targets is eliminated, and the precision and the efficiency of camera detection are improved to a certain extent.

Description

Mobile phone camera detection method and device based on image sensor pixel array
Technical Field
The invention belongs to the technical field of image processing, and particularly relates to a mobile phone camera detection method and device based on an image sensor pixel array.
Background
Along with the increasing of intelligent electronic product terminal and automotive electronics demand, domestic camera module market demand increases gradually. The mainstream configuration of the front camera reaches the level of 800 ten thousand pixels or even 1000 ten thousand pixels, the mobile phone rear cameras of all large mobile phone manufacturers are equipped with an automatic focusing function, and some manufacturers try to apply an optical zooming function to the smart phone, the automatic focusing function of the miniature camera module can greatly improve the focusing efficiency and reduce the occupied space, in order to improve the user experience during photographing and solve the problem of picture blurring, a driven elastic piece focusing motor and a closed-loop focusing motor are gradually converted and developed into an optical anti-shake focusing motor. The camera recognition technology is mainly applied to distinguishing true and false targets, the traditional target recognition method is poor in robustness due to the fact that false alarms are various, a camera recognition algorithm for deep learning needs to select a proper model and a reasonable training mode, meanwhile, a large number of sample sets are needed to be used as input, a trained model of a camera public data set is not available, and the efficiency and accuracy of camera detection are reduced.
Disclosure of Invention
In view of this, the invention provides a method and a device for detecting a mobile phone camera based on an image sensor pixel array, which solve the efficiency of effectively detecting and screening abnormal products in batches, and ensure the productivity and the accuracy, and are specifically realized by adopting the following technical scheme.
In a first aspect, the present invention provides a method for detecting a camera of a mobile phone based on an image sensor pixel array, including the following steps:
acquiring the characteristics of a target camera area or a gray level step in an image before and after the active irradiation of an external infrared light source to realize target detection and obtain an input image, wherein an EL-NIR image and an NL-NIR image are used as input;
preprocessing an input image to improve the signal-to-noise ratio of the image, and obtaining a suspicious target seed point by using a target segmentation algorithm of a histogram and an image entropy;
acquiring a complete highlight area, and screening suspicious target discrimination by carrying out target discrimination through a feature descriptor of a target camera, wherein the screening process comprises carrying out image difference on an EL-NIR image and an NL-NIR image to obtain a difference image to realize preliminary background suppression, improving the significance of a real target in the image by using morphological filtering, acquiring target highlight area fragments by target segmentation, and acquiring the complete highlight area of the target by using self-adaptive area growth;
and determining the repeated detection condition of the target by a detection clustering algorithm, and displaying the detection result by an RGB color image.
As a further improvement of the above technical solution, the screening process includes performing image difference on the EL-NIR image and the NL-NIR image to obtain a differential image to realize preliminary background suppression, including:
the pixel values of the two images are correspondingly subtracted to achieve a similar part weakening the images, the changed part of the images is highlighted, and the differential image is obtained in a mode that the current image, the fixed background differential image and the difference between two continuous images are included;
the expression obtained after image differentiation is Idif(x,y)=Ip(x,y)-In(x, y) wherein ip、InEL-NIR image and NL-NIR image, I, respectivelydifFor the obtained difference image, (x, y) is the pixel point coordinate for image alignment difference;
the target camera forms small-sized quasi-circular light spots under the irradiation of infrared light, and the signal-to-noise ratio of the image is improved by analyzing the shape characteristics and the gray level characteristics of the target, and the expression is
Figure BDA0003517281100000021
Wherein IdstFor background suppressed images after processing by background suppression algorithms, IdifIn the form of a difference image,
Figure BDA0003517281100000022
in order to perform the operation of dilation,
Figure BDA0003517281100000023
for corrosion calculation, MdAs an expanding structural element in the algorithm, MeIs an element of the corrosion structure in the algorithm.
As a further improvement of the above solution, the erosion reduces the pixel area with high gray value by eliminating relatively isolated pixels in the image edges and eroding the contour of the particles according to the template defined by the structuring elements, for any given pixel p0Structuring element by p0Centered, the element masked by the structuring element is equal to 1 and denoted piThen pixel piIs equal to 0, p is0Set to 0 if piIs 1 to p0Is set to 1;
the expansion expands the outline of the pixel points according to the template defined by the structural elements by eliminating tiny holes among the image gathering pixel points, and increases the brightness of the pixels around the pixels with high brightness, so that the area of the pixels with high gray values is increased.
As a further improvement of the above technical solution, obtaining characteristics of a target camera area or a gray level step in an image before and after active irradiation by an external infrared light source to realize target detection and obtain an input image includes:
dividing the image into a plurality of areas and processing the areas to detect noise in the image, wherein different areas adapt to the size of the module according to the actual condition of the different areas, and processing the detected module to remove the noise in the image;
establishing a reference coordinate system according to the standard image, and creating one or more ROI interested search areas, wherein the ROI comprises stable characteristics and detection contents of the product image;
and determining a coordinate system of the image to be detected by using a reference system as a standard through an algorithm positioning function and edge detection or template matching, and tracking the position and the direction of the object in the image based on the coordinate system.
As a further improvement of the above technical solution, establishing a reference coordinate system according to the standard image, and creating one or more ROI (region of interest) search areas comprises:
acquiring a region to be processed, drawing an ROI, and multiplying the feature to be processed by the region of interest or a preset mask to ensure that the gray value of pixels in the region to be processed is unchanged and the gray values of other regions are zero;
removing interference, and shielding interference characteristics through a mask so as to enable the interference characteristics not to participate in operation;
and acquiring target characteristics, and detecting and acquiring morphological characteristics similar to the mask in the picture to be detected by adopting a similar shape or template matching algorithm.
As a further improvement of the above technical solution, obtaining a suspicious target seed point by using a target segmentation algorithm of a histogram and an image entropy includes:
extracting a high-gray-scale area with a fixed proportion by using a histogram threshold segmentation algorithm to extract a real target area, combining an image global two-dimensional information entropy, and measuring the uncertainty of a random variable by adopting a Shannon entropy, wherein the expression is
Figure BDA0003517281100000041
Wherein the larger H (x) is, the larger uncertainty of x is represented, the more uncertainty is accumulated, the total entropy of the whole system is represented, the total information quantity of the information source is represented, and x is a random discrete variable and satisfies x epsilon { x ∈1,x2,x3.., the expression of the probability distribution is p (X ═ X)i)=piN, wherein p is 1,2,3iRepresenting a probability value of occurrence of each gray level in the image;
for the image I to be processeddstRespectively calculating background and foreground I obtained by dividing threshold q0、I1Entropy H of0(q)、H1(q) the expressions are:
Figure BDA0003517281100000042
Figure BDA0003517281100000043
P0(q)、P1(q) each represents IdstThe cumulative probability of the background and foreground after being segmented by a threshold q (q is more than or equal to 0 and less than or equal to k-1) is 1, wherein I is estimated0、I1Is expressed as I0:
Figure BDA0003517281100000044
I1:
Figure BDA0003517281100000045
Wherein
Figure BDA0003517281100000046
Calculated to obtain I0、I1Entropy H of0(q)、H1After (q), is obtained such that IdstEntropy after threshold segmentation H (q) maximum q, H (q) H0(q)+H1(q)。
As a further improvement of the above technical solution, a histogram-based target segmentation threshold th is obtained by selecting, from an image histogram, gray values corresponding to the number of pixels with a fixed proportion, from the gray values from high to low, where th is [ p (g) ] (g is a ratio of the number of pixels in the histogram to the number of pixels in the image histogram, where th is a ratio of the number of pixels in the image to the gray values in the pixel to be processedt>th)≤10%]Wherein g istIs the gray value of each pixel in the image, t represents each pixel point in the image, p () represents the image IdstThe probability value of the pixel point meeting the condition is obtained.
As a further improvement of the above technical solution, acquiring a complete highlight area, and performing target discrimination through a feature descriptor of a target camera to screen discrimination of a suspicious target, includes:
merging adjacent pixels with the same attribute as the seed point into the same region from the seed point to realize region amplification;
respectively limiting the size of the growing region and the contrast ratio of the central gray scale to the peripheral gray scale, and taking Ri(RiE, any point in phi, i is 1,2,3.. t) is used as a seed point, and adjacent pixels of the seed point are judged to increase the stop region.
As a further improvement of the above technical solution, acquiring a complete highlight region includes:
converting the corresponding gray value into a logic value 0 or 1 by adopting a threshold value of the column gray value;
down-sampling the obtained logic value into bit information according to the data bit resolution;
and decoding the detected data frame header to obtain carried data information so as to realize signal demodulation.
In a second aspect, the present invention further provides a device for detecting a camera of a mobile phone based on an image sensor pixel array, including:
the acquisition module is used for acquiring the characteristics of a target camera area or a gray level step in an image before and after the active irradiation of an external infrared light source to realize target detection and obtain an input image, wherein an EL-NIR image and an NL-NIR image are used as input;
the segmentation module is used for preprocessing an input image to improve the signal-to-noise ratio of the image and obtaining suspicious target seed points by using a target segmentation algorithm of a histogram and an image entropy;
the screening module is used for acquiring a complete highlight area and screening suspicious targets by carrying out target discrimination through a feature descriptor of a target camera, wherein the screening process comprises the steps of carrying out image difference on an EL-NIR image and an NL-NIR image to obtain a difference image to realize primary background suppression, improving the significance of a real target in the image by using morphological filtering, acquiring fragments of the target highlight area by target segmentation and acquiring the complete highlight area of the target by using self-adaptive area growth;
and the detection module is used for determining the repeated detection condition of the target through a detection clustering algorithm and displaying the detection result in an RGB color image.
The invention provides a mobile phone camera detection method and device based on an image sensor pixel array, which have the following beneficial effects compared with the prior art:
the method comprises the steps of achieving target detection and obtaining an input image by obtaining the characteristics of target camera areas or gray level steps in images before and after active irradiation of an external infrared light source, preprocessing the input image to improve the signal to noise ratio of the image, obtaining suspicious target seed points by using a target segmentation algorithm of a histogram and image entropy, obtaining a complete highlight area, performing target discrimination through a feature descriptor of a target camera to screen the discrimination of the suspicious target, determining the repeated detection condition of the target through a detection clustering algorithm, and displaying a detection result in an RGB color image. The target can be accurately detected in a smooth background, the real target can be detected in a complex background, meanwhile, fewer false alarms are brought, the distinguishing condition is simple, the detection performance is guaranteed, the operation performance is good, the accuracy of later-stage feature analysis and calculation is reduced by changing the shape of the target mask, and the final target judgment effect is influenced. The fact that the re-detection targets are necessarily close in physical distance is utilized, the judgment results are clustered, the situation of repeated detection of the targets is eliminated, and the precision and the efficiency of camera detection are improved to a certain extent.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a flow chart of a method for detecting a camera of a mobile phone based on an image sensor pixel array according to the present invention;
FIG. 2 is a flow chart of noise detection according to the present invention;
FIG. 3 is a flow chart of the present invention for removing noise;
FIG. 4 is a flow chart of the present invention for capturing a complete highlight region;
fig. 5 is a block diagram of the structure of the device for detecting a camera of a mobile phone based on an image sensor pixel array according to the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention and are not to be construed as limiting the present invention.
Referring to fig. 1, the invention provides a mobile phone camera detection method based on an image sensor pixel array, comprising the following steps:
s10: acquiring the characteristics of a target camera area or a gray level step in an image before and after the active irradiation of an external infrared light source to realize target detection and obtain an input image, wherein an EL-NIR image and an NL-NIR image are used as input;
s11: preprocessing an input image to improve the signal-to-noise ratio of the image, and obtaining a suspicious target seed point by using a target segmentation algorithm of a histogram and an image entropy;
s12: acquiring a complete highlight area, and screening suspicious target discrimination by carrying out target discrimination through a feature descriptor of a target camera, wherein the screening process comprises carrying out image difference on an EL-NIR image and an NL-NIR image to obtain a difference image to realize preliminary background suppression, improving the significance of a real target in the image by using morphological filtering, acquiring target highlight area fragments by target segmentation, and acquiring the complete highlight area of the target by using self-adaptive area growth;
s13: and determining the repeated detection condition of the target by a detection clustering algorithm, and displaying the detection result by an RGB color image.
In the embodiment, the screening process comprises the steps of carrying out image difference on an EL-NIR image and an NL-NIR image to obtain a differential image to realize preliminary background suppression, correspondingly subtracting pixel values of the two images to weaken a similar part of the image, and highlighting a part with changed images, wherein the differential image obtaining mode comprises the difference between a current image and a fixed background difference and the difference between two continuous images; the expression obtained after image differentiation is Idif(x,y)=Ip(x,y)-In(x, y) wherein ip、InEL-NIR image and NL-NIR image, I, respectivelydifFor the obtained difference image, (x, y) is the pixel point coordinate for image alignment difference; the target camera forms small-sized quasi-circular light spots under the irradiation of infrared light, and the target shape is analyzedThe characteristic and the gray level are respectively characterized to improve the signal to noise ratio of the image, and the expression is
Figure BDA0003517281100000071
Wherein IdstFor background suppressed images after processing by background suppression algorithms, IdifIn the form of a difference image,
Figure BDA0003517281100000072
in order to perform the operation of dilation,
Figure BDA0003517281100000073
for corrosion calculation, MdAs an expanding structural element in the algorithm, MeIs an element of the corrosion structure in the algorithm.
It should be noted that the erosion reduces the area of pixels with high gray values by eliminating relatively isolated pixels in the image edges and eroding the outline of the particles according to the template defined by the structuring element, for any given pixel p0Structuring element by p0Centered, the element masked by the structuring element is equal to 1 and denoted piThen pixel piIs equal to 0, p is0Set to 0 if piIs 1 to p0Is set to 1; the expansion expands the outline of the pixel points according to the template defined by the structural elements by eliminating tiny holes among the image gathering pixel points, and increases the brightness of the pixels around the pixels with high brightness, so that the area of the pixels with high gray values is increased.
It will be appreciated that after the background suppression algorithm removes most of the background, the saliency of real objects in the image is further improved. In order to detect a target camera which may exist in an image, a candidate target region needs to be extracted through target segmentation. In order to extract a real target and avoid the over-segmentation of the target image caused by the overlarge value of a histogram segmentation algorithm, the aim of smoothing a threshold value is achieved by solving a geometric weighted average. Although a real target is separated from an actual result obtained by using a threshold style based on the histogram, an over-segmentation phenomenon is caused and brings a large amount of noise, and the over-segmentation phenomenon not only introduces a large amount of meaningless workload for subsequent target discrimination and relief, but also reduces the overall detection effect of the algorithm. Under a smooth background, the adaptive region growing algorithm can well expand a target camera highlight area on the basis of a target segmentation result, and under a complex background, the adaptive region growing algorithm can optimize the target segmentation result of a real target, has extraction capability on linear, block and other false targets, and is beneficial to filtering false alarms.
Referring to fig. 2, optionally, the obtaining of the characteristics of the target camera area or the gray level step in the image before and after the active irradiation of the external infrared light source to achieve the target detection and obtain the input image includes:
s20: dividing the image into a plurality of areas and processing the areas to detect noise in the image, wherein different areas adapt to the size of the module according to the actual condition of the different areas, and processing the detected module to remove the noise in the image;
s21: establishing a reference coordinate system according to the standard image, and creating one or more ROI interested search areas, wherein the ROI comprises stable characteristics and detection contents of the product image;
s22: and determining a coordinate system of the image to be detected by using a reference system as a standard through an algorithm positioning function and edge detection or template matching, and tracking the position and the direction of the object in the image based on the coordinate system.
In this embodiment, in most cases, the position of the object to be measured in the field of view of the camera cannot be completely fixed, and when the position of the product needs to be shifted, the ROI search region also needs to be moved relative to the coordinate system, and glue at four corners of the camera needs to be detected, that is, the ROI region is the four corners of the camera. The image mask is a binary image, the size requirement of the mask is smaller than or equal to that of the image to be detected, the image mask module can detect and process the corresponding module size in the processed image, if one pixel has a non-zero value in the image mask, the corresponding pixel can be processed in the image detection process, otherwise, if the gray value of one pixel in the image mask is zero, the corresponding pixel is ignored in the image processing process, the UV glue parts at four corners of the object to be detected are extracted separately, and the efficiency and the stability are provided for the subsequent algorithm processing and analysis.
Referring to fig. 3, optionally, establishing a reference coordinate system based on the standard image and creating one or more ROI-interest search regions includes:
s30: acquiring a region to be processed, drawing an ROI, and multiplying the feature to be processed by the region of interest or a preset mask to ensure that the gray value of pixels in the region to be processed is unchanged and the gray values of other regions are zero;
s31: removing interference, and shielding interference characteristics through a mask so as to enable the interference characteristics not to participate in operation;
s32: and acquiring target characteristics, and detecting and acquiring morphological characteristics similar to the mask in the picture to be detected by adopting a similar shape or template matching algorithm.
In the embodiment, a suspicious target seed point is obtained by using a target segmentation algorithm of a histogram and an image entropy, a high-gray-scale region with a fixed proportion is extracted by using a histogram threshold segmentation algorithm to extract a real target region, the uncertainty of a random variable is measured by combining an image global two-dimensional information entropy and adopting a shannon entropy, and the expression is
Figure BDA0003517281100000091
Wherein the larger H (x) is, the larger uncertainty of x is represented, the more uncertainty is accumulated, the total entropy of the whole system is represented, the total information quantity of the information source is represented, and x is a random discrete variable and satisfies x epsilon { x ∈1,x2,x3.., the expression of the probability distribution is p (X ═ X)i)=piN, wherein p is 1,2,3iRepresenting a probability value of occurrence of each gray level in the image; for the image I to be processeddstRespectively calculating background and foreground I obtained by dividing threshold q0、I1Entropy H of0(q)、H1(q) the expressions are:
Figure BDA0003517281100000101
P0(q)、P1(q) each represents IdstThrough a threshold q (0)Q is less than or equal to k-1) the cumulative probability of the background and foreground after segmentation, both probabilities being 1, wherein I is estimated0、I1Is expressed as I0:
Figure BDA0003517281100000102
I1:
Figure BDA0003517281100000103
Wherein
Figure BDA0003517281100000104
Calculated to obtain I0、I1Entropy H of0(q)、H1After (q), is obtained such that IdstEntropy after threshold segmentation H (q) maximum q, H (q) H0(q)+H1(q)。
Note that, a target division threshold value th based on a histogram is obtained by selecting a gray value corresponding to the number of pixels of a fixed ratio from an image histogram for each gray value from high to low [ p (g) is obtainedt>th)≤10%]Wherein g istIs the gray value of each pixel in the image, t represents each pixel point in the image, p () represents the image IdstAnd the probability value of the pixel point meeting the condition is obtained.
Referring to fig. 4, optionally, acquiring a full highlight region comprises:
s40: converting the corresponding gray value into a logic value 0 or 1 by adopting a threshold value of the column gray value;
s41: down-sampling the obtained logic value into bit information according to the data bit resolution;
s42: and decoding the detected data frame header to obtain carried data information so as to realize signal demodulation.
In the embodiment, a complete highlight area is obtained, the discrimination of suspicious targets is screened by discriminating the targets through the feature descriptors of the target cameras, and adjacent pixels with the same attribute as the seed points are merged into the same area from the seed points to realize area amplification; respectively limiting the size of the growing region and the contrast ratio of the central gray scale to the peripheral gray scale, and taking Ri(RiE, any point in phi, i is 1,2,3.. t) is used as a seed point, and adjacent pixels of the seed point are judged to increase the stop region.
Referring to fig. 5, the present invention further provides a mobile phone camera detection device based on an image sensor pixel array, including:
the acquisition module is used for acquiring the characteristics of a target camera area or a gray level step in an image before and after the active irradiation of an external infrared light source to realize target detection and obtain an input image, wherein an EL-NIR image and an NL-NIR image are used as input;
the segmentation module is used for preprocessing an input image to improve the signal-to-noise ratio of the image and obtaining suspicious target seed points by using a target segmentation algorithm of a histogram and an image entropy;
the screening module is used for acquiring a complete highlight area and screening suspicious targets by carrying out target discrimination through a feature descriptor of a target camera, wherein the screening process comprises the steps of carrying out image difference on an EL-NIR image and an NL-NIR image to obtain a difference image to realize primary background suppression, improving the significance of a real target in the image by using morphological filtering, acquiring fragments of the target highlight area by target segmentation and acquiring the complete highlight area of the target by using self-adaptive area growth;
and the detection module is used for determining the repeated detection condition of the target through a detection clustering algorithm and displaying the detection result in an RGB color image.
In this embodiment, the target segmentation algorithm splits the connected domain of the same target, so that the same target is recalled repeatedly, and repeated detection of the same target causes unnecessary triggering alarm to be generated by the system, which results in repeated detection and waste of manpower. And communicating the fracture area by using morphological open-close operation in the suspicious target extraction stage, then judging the target, and after judging the target, using a clustering algorithm to regard the detection result with similar clustering as a target. Changing the shape of the target mask reduces the accuracy of later stage feature analysis and calculation, affecting the final target decision. And clustering the judgment results by utilizing the fact that the re-detection targets are necessarily close in physical distance, so as to eliminate the situation of repeated detection of the targets.
In all examples shown and described herein, any particular value should be construed as merely exemplary, and not as a limitation, and thus other examples of example embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above examples are merely illustrative of several embodiments of the present invention, and the description thereof is more specific and detailed, but not to be construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention.

Claims (10)

1. A mobile phone camera detection method based on an image sensor pixel array is characterized by comprising the following steps:
acquiring the characteristics of a target camera area or a gray level step in an image before and after the active irradiation of an external infrared light source to realize target detection and obtain an input image, wherein an EL-NIR image and an NL-NIR image are used as input;
preprocessing an input image to improve the signal-to-noise ratio of the image, and obtaining a suspicious target seed point by using a target segmentation algorithm of a histogram and an image entropy;
acquiring a complete highlight area, and screening suspicious target discrimination by carrying out target discrimination through a feature descriptor of a target camera, wherein the screening process comprises carrying out image difference on an EL-NIR image and an NL-NIR image to obtain a difference image to realize preliminary background suppression, improving the significance of a real target in the image by using morphological filtering, acquiring target highlight area fragments by target segmentation, and acquiring the complete highlight area of the target by using self-adaptive area growth;
and determining the repeated detection condition of the target by a detection clustering algorithm, and displaying the detection result by an RGB color image.
2. The mobile phone camera detection method based on the image sensor pixel array as claimed in claim 1, wherein the screening process includes performing image difference on the EL-NIR image and the NL-NIR image to obtain a differential image to achieve preliminary background suppression, and includes:
the pixel values of the two images are correspondingly subtracted to achieve a similar part weakening the images, the changed part of the images is highlighted, and the differential image is obtained in a mode that the current image, the fixed background differential image and the difference between two continuous images are included;
the expression obtained after image differentiation is Idif(x,y)=Ip(x,y)-In(x, y) wherein ip、InEL-NIR image and NL-NIR image, I, respectivelydifFor the obtained difference image, (x, y) is the pixel point coordinate for image alignment difference;
the target camera forms small-sized quasi-circular light spots under the irradiation of infrared light, and the signal-to-noise ratio of the image is improved by analyzing the shape characteristics and the gray level characteristics of the target, and the expression is
Figure FDA0003517281090000021
Wherein IdstFor background suppressed images after processing by background suppression algorithms, IdifIs a difference image of the image data and is,
Figure FDA0003517281090000022
in order to perform the operation of dilation,
Figure FDA0003517281090000023
for corrosion calculation, MdAs an expanding structural element in the algorithm, MeIs an erosion structural element in the algorithm.
3. The method of claim 2, wherein the erosion is performed by removing relatively isolated pixels from the edges of the image and etching the edges according to a template defined by the structuring elementBy etching the outline of the particles so that the area of the pixel with the higher gray value is reduced, for any given pixel p0Structuring element by p0Centered, the element masked by the structuring element is equal to 1 and denoted piThen pixel piIs equal to 0, p is0Set to 0, if piIs 1 to p0Is set to 1;
the expansion expands the outline of the pixel points according to the template defined by the structural elements by eliminating tiny holes among the image gathering pixel points, and increases the brightness of the pixels around the pixels with high brightness, so that the area of the pixels with high gray values is increased.
4. The method for detecting the mobile phone camera based on the pixel array of the image sensor according to claim 1, wherein the step of obtaining the characteristic of the target camera area or the gray level in the image before and after the active irradiation of the external infrared light source is performed to realize the target detection and obtain the input image, and the method comprises the following steps:
dividing the image into a plurality of areas and processing the areas to detect the noise in the image, wherein different areas adapt to the size of the module according to the actual condition of the different areas, and processing the detected module to remove the noise in the image;
establishing a reference coordinate system according to the standard image, and creating one or more ROI interested search areas, wherein the ROI comprises stable characteristics and detection contents of the product image;
and determining a coordinate system of the image to be detected by using a reference system as a standard through an algorithm positioning function and edge detection or template matching, and tracking the position and the direction of the object in the image based on the coordinate system.
5. The method of claim 4, wherein establishing a reference coordinate system based on the standard image and creating one or more ROI (region of interest) search areas comprises:
acquiring a region to be processed, drawing an ROI, and multiplying the feature to be processed by the region of interest or a preset mask to ensure that the gray value of pixels in the region to be processed is unchanged and the gray values of other regions are zero;
interference is removed, and interference characteristics are shielded through a mask so as not to participate in operation;
and acquiring target characteristics, and detecting and acquiring morphological characteristics similar to the mask in the picture to be detected by adopting a similar shape or template matching algorithm.
6. The method for detecting the mobile phone camera based on the pixel array of the image sensor as claimed in claim 1, wherein the obtaining of the suspicious target seed point by using a target segmentation algorithm of a histogram and an image entropy comprises:
extracting a high-gray-scale area with a fixed proportion by using a histogram threshold segmentation algorithm to extract a real target area, combining an image global two-dimensional information entropy, and measuring the uncertainty of a random variable by adopting a Shannon entropy, wherein the expression is
Figure FDA0003517281090000031
Wherein the larger H (x) is, the larger uncertainty of x is represented, the more uncertainty is accumulated, the total entropy of the whole system is represented, the total information quantity of the information source is represented, and x is a random discrete variable and satisfies x epsilon { x ∈1,x2,x3.., the expression of the probability distribution is p (X ═ X)i)=piN, wherein p is 1,2,3iRepresenting a probability value of occurrence of each gray level in the image;
for the image I to be processeddstRespectively calculating background and foreground I obtained by dividing threshold q0、I1Entropy H of0(q)、H1(q) the expressions are:
Figure FDA0003517281090000032
Figure FDA0003517281090000033
P0(q)、P1(q) each represents IdstThe cumulative probability of the background and the foreground after the segmentation by the threshold value q (q is more than or equal to 0 and less than or equal to k-1) is 1In estimating I0、I1Is expressed as a probability density function of
Figure FDA0003517281090000034
Wherein
Figure FDA0003517281090000035
Calculated to obtain I0、I1Entropy H of0(q)、H1After (q), is obtained such that IdstEntropy after threshold segmentation H (q) maximum q, H (q) H0(q)+H1(q)。
7. The method for detecting the camera of the mobile phone based on the pixel array of the image sensor, according to claim 6, further comprising:
selecting gray values corresponding to the number of pixels with a fixed proportion from an image histogram according to the gray values from high to low to obtain a target segmentation threshold th based on the histogram, wherein th is [ p (g)t>th)≤10%]Wherein g istIs the gray value of each pixel in the image, t represents each pixel point in the image, p () represents the image IdstAnd the probability value of the pixel point meeting the condition is obtained.
8. The method for detecting the mobile phone camera based on the pixel array of the image sensor as claimed in claim 1, wherein a complete highlight area is obtained, and the discrimination of the suspicious target is screened by the discrimination of the target by the feature descriptor of the target camera, comprising:
merging adjacent pixels with the same attribute as the seed point into the same region from the seed point to realize region amplification;
respectively limiting the size of the growing region and the contrast ratio of the central gray scale to the peripheral gray scale, and taking Ri(RiE, any point in phi, i is 1,2,3.. t) is used as a seed point, and adjacent pixels of the seed point are judged to increase the stop region.
9. The method of claim 8, wherein acquiring the complete highlight area comprises:
converting the corresponding gray value into a logic value 0 or 1 by adopting a threshold value of the column gray value;
down-sampling the obtained logic value into bit information according to the data bit resolution;
and decoding the detected data frame header to obtain carried data information so as to realize signal demodulation.
10. The device for detecting the cell phone camera based on the image sensor pixel array according to any one of claims 1 to 9, comprising:
the acquisition module is used for acquiring the characteristics of a target camera area or a gray level step in an image before and after the active irradiation of an external infrared light source to realize target detection and obtain an input image, wherein an EL-NIR image and an NL-NIR image are used as input;
the segmentation module is used for preprocessing an input image to improve the signal-to-noise ratio of the image and obtaining suspicious target seed points by using a target segmentation algorithm of a histogram and an image entropy;
the screening module is used for acquiring a complete highlight area and screening suspicious targets by carrying out target discrimination through a feature descriptor of a target camera, wherein the screening process comprises the steps of carrying out image difference on an EL-NIR image and an NL-NIR image to obtain a difference image to realize primary background suppression, improving the significance of a real target in the image by using morphological filtering, acquiring fragments of the target highlight area by target segmentation and acquiring the complete highlight area of the target by using self-adaptive area growth;
and the detection module is used for determining the repeated detection condition of the target through a detection clustering algorithm and displaying the detection result in an RGB color image.
CN202210170072.5A 2022-02-23 2022-02-23 Mobile phone camera detection method and device based on image sensor pixel array Pending CN114554188A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210170072.5A CN114554188A (en) 2022-02-23 2022-02-23 Mobile phone camera detection method and device based on image sensor pixel array

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210170072.5A CN114554188A (en) 2022-02-23 2022-02-23 Mobile phone camera detection method and device based on image sensor pixel array

Publications (1)

Publication Number Publication Date
CN114554188A true CN114554188A (en) 2022-05-27

Family

ID=81677336

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210170072.5A Pending CN114554188A (en) 2022-02-23 2022-02-23 Mobile phone camera detection method and device based on image sensor pixel array

Country Status (1)

Country Link
CN (1) CN114554188A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116027181A (en) * 2023-03-30 2023-04-28 浙江瑞测科技有限公司 Parallel image processing device and method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7009644B1 (en) * 1999-12-15 2006-03-07 Logitech Europe S.A. Dynamic anomalous pixel detection and correction
CN109544535A (en) * 2018-11-26 2019-03-29 马杰 It is a kind of that camera detection method and system are pried through based on infrared cutoff filter optical filtration characteristic

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7009644B1 (en) * 1999-12-15 2006-03-07 Logitech Europe S.A. Dynamic anomalous pixel detection and correction
CN109544535A (en) * 2018-11-26 2019-03-29 马杰 It is a kind of that camera detection method and system are pried through based on infrared cutoff filter optical filtration characteristic

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
张振山: ""基于手机摄像头的可见光通信关键技术研究"", 《中国优秀硕士学位论文全文数据库》, 15 August 2019 (2019-08-15), pages 3 *
林红;孙雅娟;: "形态学和信息熵在红外目标检测算法中的应用研究", 制造业自动化, no. 20, 25 October 2013 (2013-10-25) *
柯学: ""基于机器视觉的隐蔽摄像头检测与识别方法研究"", 《中国优秀硕士学位论文全文数据库》, 15 March 2020 (2020-03-15), pages 3 *
王文彬: ""基于机器视觉的智能手机摄像头模组组装线设计"", 《中国优秀硕士学位论文全文数据库》, 15 January 2021 (2021-01-15), pages 3 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116027181A (en) * 2023-03-30 2023-04-28 浙江瑞测科技有限公司 Parallel image processing device and method
CN116027181B (en) * 2023-03-30 2023-07-18 浙江瑞测科技有限公司 Parallel image processing device and method

Similar Documents

Publication Publication Date Title
CN110334706B (en) Image target identification method and device
Yousif et al. Toward an optimized neutrosophic K-means with genetic algorithm for automatic vehicle license plate recognition (ONKM-AVLPR)
CN109934224B (en) Small target detection method based on Markov random field and visual contrast mechanism
WO2018145470A1 (en) Image detection method and device
EP1255225A2 (en) Method for detecting eye and mouth positions in a digital image
CN113449606B (en) Target object identification method and device, computer equipment and storage medium
WO2017135120A1 (en) Computationally efficient frame rate conversion system
CN111047624A (en) Image dim target detection method, device, equipment and storage medium
CN111028263B (en) Moving object segmentation method and system based on optical flow color clustering
CN115311507A (en) Building board classification method based on data processing
CN114554188A (en) Mobile phone camera detection method and device based on image sensor pixel array
Wu et al. Video surveillance object recognition based on shape and color features
CN107704864B (en) Salient object detection method based on image object semantic detection
WO2024016632A1 (en) Bright spot location method, bright spot location apparatus, electronic device and storage medium
CN113450373A (en) Optical live image-based real-time discrimination method for characteristic events in carrier rocket flight process
Sanmiguel et al. Pixel-based colour contrast for abandoned and stolen object discrimination in video surveillance
JP2006309714A (en) Face discrimination method and device, and program
Tong et al. Document image binarization based on NFCM
CN115294163A (en) Face image quality evaluation method based on adaptive threshold segmentation algorithm
CN112749714A (en) Method for detecting polymorphic dark and weak small target in single-frame infrared image
CN112926676B (en) False target identification method and device and computer equipment
Jadav et al. Shadow Extraction and Elimination of Moving Vehicles for Tracking Vehicles
CN111476815B (en) Moving target detection method based on color probability of moving area
CN112418105B (en) High maneuvering satellite time sequence remote sensing image moving ship target detection method based on difference method
Thike et al. Vehicle detection using upper local ternary features with SVM classification

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