Single-pixel edge detection method and device

Light is modulated by generating a modulation matrix through a single-pixel detector, and edge detection is achieved using a reconstruction algorithm and Radon transform. This solves the problems of complex calculations and high costs of traditional methods and achieves low-cost and fast edge detection.

CN115035140BActive Publication Date: 2025-09-12HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210429222.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-22
Publication Date
2025-09-12
Estimated Expiration
2042-04-22

AI Technical Summary

Technical Problem

Traditional edge detection methods require obtaining object images, which are computationally complex and have large errors in low-light conditions. They are also costly in certain bands, and array cameras cannot achieve edge detection.

Method used

A single-pixel detector is used to modulate light by generating two-dimensional modulation information matrices A and B, detect the light signal intensity value, calculate the edge information using a reconstruction algorithm, and realize edge detection by combining Radon transform and filtered back projection algorithm.

Benefits of technology

Without the need for object images, low-cost and fast-computing edge detection is achieved, which is especially effective in low-light and high-cost bands, reducing system costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115035140B_ABST
    Figure CN115035140B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of computational imaging and edge detection, and particularly relates to a single-pixel edge detection method and device. The edge detection method comprises the following steps: Step S1: generating a two-dimensional modulation information matrix A, and translating the two-dimensional modulation information matrix A by one unit to obtain a two-dimensional modulation information matrix B; Step S2: modulating the illumination light using the two-dimensional modulation information matrix A and the two-dimensional modulation information matrix B respectively; Step S3: respectively detecting the total intensity values ​​of the light signals of the two groups of modulated illumination lights after they penetrate the target object or are reflected by the target object, and obtaining two groups of total intensity values ​​of the light signals; Step S4: calculating the edge information of the target object using a reconstruction algorithm based on the two groups of total intensity values ​​of the light signals. Compared with the traditional method of using images to detect the edges of objects, the present invention does not require reconstruction of the image of the object and directly obtains the transformation of the object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computational imaging and edge detection, and in particular relates to a single-pixel edge detection method and device. Background Art

[0002] Edges usually represent significant changes in the transmittance or reflectance of an object. These changes usually reflect important information, so edge detection is of great research significance.

[0003] Traditional edge detection methods require first obtaining an image of the object and then calculating its contours based on the image. These methods not only require significant computational power but also suffer from significant errors when calculating the contours of the target object in low-light conditions. Furthermore, in certain wavelength bands, such as terahertz, traditional edge detection methods are costly and, due to the limitations of array cameras, cannot detect edges within certain wavelength ranges. Therefore, there is an urgent need for a cost-effective, fast, and fully applicable object edge detection method that can directly determine the object's contours. Summary of the Invention

[0004] In order to solve the above problems, the present invention discloses a single-pixel edge detection method, which includes the following steps:

[0005] Step S1: Generate a two-dimensional modulation information matrix A, and translate the two-dimensional modulation information matrix A by one unit to obtain a two-dimensional modulation information matrix B;

[0006] Step S2: modulating the illumination light using the two-dimensional modulation information matrix A and the two-dimensional modulation information matrix B respectively;

[0007] Step S3: respectively detecting the total intensity values ​​of the light signals of the two groups of modulated illumination lights after they penetrate the target object or are reflected by the target object, to obtain two groups of total intensity values ​​of the light signals;

[0008] Step S4: Calculating edge information of the target object using a reconstruction algorithm based on the two sets of light signal total intensity values.

[0009] Furthermore, the expression of each matrix in the two-dimensional modulation information matrix A is as follows:

[0010] p 0 (x, y; L, θ) = h R (L)δ(xcosθ+ysinθ-L)

[0011] The expression of each matrix in the two-dimensional modulation information matrix B is as follows:

[0012] p t (x, y; L, θ) = p 0(x,y;L+1,θ)

[0013] Among them, p 0 (x, y; L, θ) is the element value corresponding to the coordinate (x, y) in the two-dimensional matrix, h R (L) is equal to the value of the Rth row and [L]th column in the Hadamard matrix, [L] is the maximum integer value not greater than L, δ is the Dirac function, and θ is the angle with the x-axis.

[0014] Furthermore, the step S2 specifically includes the following steps:

[0015] Step S21: sending the two-dimensional modulation information matrix A and the two-dimensional modulation information matrix B to an imaging system to generate two sets of modulated illumination lights;

[0016] Step S22: irradiating the target object with the two sets of modulated illumination lights in sequence;

[0017] Step S23: receiving a light signal of the illumination light penetrating the target object or reflected by the target object.

[0018] Furthermore, the total intensity value of the optical signal obtained after modulation by the two-dimensional modulation information matrix A in step S3 is is calculated as follows:

[0019]

[0020] The total intensity value of the optical signal obtained after modulation by the two-dimensional modulation information matrix B is calculated as follows:

[0021]

[0022] Among them, f(x,y) is the two-dimensional distribution function of the target object, p 0 (x, y; L, θ) is the modulated illumination light information.

[0023] Furthermore, the step S4 specifically includes the following steps:

[0024] Step S41: Calculating gradient information based on the total intensity values ​​of the two sets of optical signals;

[0025] Step S42: Calculate all Radon spectra of the gradients with angles in the positive direction of the abscissa ranging from 0 to 179 degrees based on the gradient information, and arrange them in order of angles to obtain Radon spectra of the gradients;

[0026] Step S43: Calculate edge information of the target object using a filtered back projection algorithm according to the Radon spectrum.

[0027] Furthermore, the expression for calculating the edge information of the target object based on the Radon spectrum is specifically as follows:

[0028]

[0029] Where B represents the back-projection operator, S represents the filter function, and F -1 t represents inverse Fourier transform, F'(L,θ) represents Radon spectrum, and * represents convolution operation.

[0030] Furthermore, after step S4, the step further includes

[0031] Step S5: Place the target image in an M*N square matrix, record the edge point coordinates of the target image, and calculate the root mean square error with the target contour point coordinates obtained in steps S1-S4.

[0032] The present invention also discloses a single-pixel edge detection device, the detection device comprising

[0033] A modulation unit, configured to generate a two-dimensional modulation information matrix A, and translate the two-dimensional modulation information matrix A by one unit to obtain a two-dimensional modulation information matrix B;

[0034] A light source is used to modulate light information according to the two-dimensional modulation information matrices A and B generated by the modulation unit and then illuminate the target object;

[0035] a detector for respectively detecting the total intensity values ​​of the light signals of the two groups of modulated illumination lights after they penetrate the target object or are reflected by the target object, thereby obtaining the total intensity values ​​of the two groups of light signals;

[0036] a calculation unit, configured to calculate edge information of the target object using a reconstruction algorithm based on the two sets of light signal intensity values;

[0037] The display unit is used to display the outline of the target object.

[0038] The present invention further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is run, the single-pixel edge detection method described in any one of the above embodiments is executed.

[0039] The present invention also discloses a computer device, including a processor and a storage medium, wherein a computer program is stored on the storage medium. The processor reads and runs the computer program from the storage medium to execute the single-pixel edge detection method as described in any one of the above embodiments.

[0040] Beneficial effects

[0041] The method of detecting edges using a single-pixel detector in the present invention can obtain the edge information of an object and realize edge detection without directly obtaining an image of the object. The single-pixel detection edge detection technology based on Radon transform uses spatially modulated light to illuminate the object, and uses a single-pixel detector to detect the intensity of the light reflected by the object, and finally uses a reconstruction algorithm to directly obtain the edge map of the object. Compared with the traditional method of using images to detect the edges of objects, this method does not require the reconstruction of the image of the object but directly obtains the transformation of the object. In addition, since single-pixel detectors are generally more sensitive to light than pixel arrays, they have advantages in weak light conditions. At the same time, in special bands, such as terahertz, it is less expensive to build a single-pixel detection system, and even single-pixel detectors can work in a wavelength range that array cameras cannot detect. The present invention realizes edge detection by utilizing Radon transform and combining it with the principle of single-pixel imaging.

[0042] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0044] Figure 1 A flowchart of a single-pixel edge detection method according to an embodiment of the present invention is shown;

[0045] Figure 2 shows a flow chart of modulating illumination light according to an embodiment of the present invention;

[0046] Figure 3 A flowchart showing how to calculate edge information of a target object using a reconstruction algorithm based on two sets of total intensity values ​​of light signals according to an embodiment of the present invention is shown;

[0047] Figure 4 A schematic structural diagram of a single-pixel edge detection device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0048] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0049] like Figure 1 As shown, the present invention discloses a single-pixel edge detection method, which includes the following steps:

[0050] Step S1: Generate a two-dimensional modulation information matrix A, and translate the two-dimensional modulation information matrix A by one unit to obtain a two-dimensional modulation information matrix B;

[0051] Step S2: modulating the illumination light using the two-dimensional modulation information matrix A and the two-dimensional modulation information matrix B respectively;

[0052] Step S3: respectively detecting the total intensity values ​​of the light signals of the two groups of modulated illumination lights after they penetrate the target object or are reflected by the target object, to obtain two groups of total intensity values ​​of the light signals;

[0053] Step S4: Calculating edge information of the target object using a reconstruction algorithm based on the two sets of light signal total intensity values.

[0054] Specifically, the illumination light is modulated respectively by using a two-dimensional modulation information matrix A and a two-dimensional modulation information matrix B. After obtaining two groups of modulated illumination lights, the target object is illuminated in sequence using the above illumination lights. The illumination light may be reflected or may penetrate the target object after passing through the target object. The light signal that has penetrated the target object or reflected by the target object is detected to obtain the total intensity value of the two groups of light signals. The edge information of the target object can be calculated using a reconstruction algorithm based on the difference in the total intensity values ​​of the two groups of light signals. By integrating single-pixel imaging technology and edge detection technology, this method can realize edge detection without directly acquiring the image of the object, providing a new method for edge detection of the object. Especially in the case of weak light, the inability of the array detector to respond, or the high cost of the corresponding band array detector, this method can play a key role in the practical application of edge detection.

[0055] like Figure 2 As shown, in another embodiment of the present invention, step S2 specifically includes the following steps:

[0056] Step S21: sending the two-dimensional modulation information matrix A and the two-dimensional modulation information matrix B to an imaging system to generate two sets of modulated illumination lights;

[0057] Step S22: irradiating the target object with the two sets of modulated illumination lights in sequence;

[0058] Step S23: receiving a light signal of the illumination light penetrating the target object or reflected by the target object.

[0059] Specifically, the two-dimensional modulation information matrices A and B are image modulation patterns. Modulating light using different two-dimensional modulation patterns will produce lightwave signals with different parameters. After modulating light using the image modulation pattern, a lightwave signal with specific properties such as amplitude, frequency, phase, polarization state, and duration is obtained. For example, the expression for each matrix in the two-dimensional modulation information matrix A is as follows:

[0060] p 0 (x, y; L, θ) = h R (L)δ(xcosθ+ysinθ-L)

[0061] Among them, p 0 (x, y; L, θ) is the element value corresponding to the coordinate (x, y) in the two-dimensional matrix, h R (L) is equal to the value of the Rth row and [L]th column in the Hadamard matrix, [L] is the maximum integer value not greater than L, δ is the Dirac function, θ is the angle between the two-dimensional object and the x-axis, and the value of θ is a constant for any two-dimensional matrix. Since the two-dimensional modulation information matrix B is obtained by translating the two-dimensional modulation information matrix A, the expression of each matrix in the two-dimensional modulation information matrix B is: p t (x, y; L, θ) = p 0 (x,y;L+1,θ)

[0062] After determining the angle between the target object and the X-axis, two image modulation patterns can be obtained using the two-dimensional modulation information matrices A and B. The two image modulation patterns are sequentially loaded into a specific imaging system to modulate the illumination light. For example, after the illumination light is modulated using the two-dimensional modulation information matrix A, it is irradiated onto the target object, which reflects the illumination light, and the total intensity value of the reflected light signal is detected. After the illumination light is modulated using the two-dimensional modulation information matrix B, it is irradiated onto the target object and the total intensity value of the light signal of the reflected light is detected. In this embodiment, the target object is a non-transparent object. When the target object is a transparent object, the transmitted light through the target object is detected, and two sets of total intensity values ​​of light information are also obtained. According to the principle of single-pixel imaging, the intensity signal received by the single-pixel detector can be expressed as:

[0063]

[0064] Among them, f(x,y) is the two-dimensional distribution function of the target object, p 0(x, y; L, θ) is the modulated illumination light information, is the intensity value received after the illumination spot illuminates the object using the two-dimensional modulation information matrix A as the modulation information, is the intensity value received after the illumination spot illuminates the object using the two-dimensional modulation information matrix B as the modulation information. and optical signal strength value Afterwards, the edge information of the target object can be calculated by using the reconstruction algorithm based on the difference in the total intensity values ​​of the two sets of light signals. The specific calculation process is described in detail in other embodiments of the present invention.

[0065] like Figure 3 As shown, in another embodiment of the present invention, step S4 specifically includes the following steps:

[0066] Step S41: Calculating gradient information based on the difference between the total intensity values ​​of the two groups of optical signals;

[0067] Step S42: Calculate all Radon spectra of the gradients with angles in the positive direction of the abscissa ranging from 0 to 179 degrees based on the gradient information, and arrange them in order of angles to obtain Radon spectra of the gradients;

[0068] Step S43: Calculate edge information of the target object using a filtered back projection algorithm according to the Radon spectrum.

[0069] For example, after obtaining the optical signal strength value and optical signal strength value Afterwards, the optical signal intensity value measured after the shift is subtracted from the optical signal intensity value measured before the shift to obtain their difference, which is the gradient information between the two sets of optical signal total intensity values. The function relationship is then simplified, and the simplification process and the final difference between the two are as follows:

[0070]

[0071] where f 0 (x,y) represents the two-dimensional distribution function when the object is not translated, f t (x, y) represents the two-dimensional distribution function of the object after translating it by one unit along the direction, f′ θ (x,y) represents the gradient of the two-dimensional object in the θ direction, F′ θ (L) represents a spectral line of the gradient Radon spectrum at an angle of θ. Using the linear correlation principle, the formula for the gradient Radon spectrum line can be calculated as follows:

[0072] F′ θ (L)=Σ R h R (L)I θ (R),

[0073] Based on the formula for calculating gradient Radon spectra, all gradient Radon spectra with angles from 0 to 179 degrees in the positive direction of the abscissa are calculated and arranged in angular order to obtain a Radon spectrum of gradient information about the total intensity value of the light signal. Substituting this Radon spectrum into the filtered back projection algorithm yields the edge information of the target object. The specific expression for the edge information of the target object is as follows:

[0074]

[0075] Where B represents the back-projection operator, S represents the filter function, and F -1 t represents inverse Fourier transform, F'(L,θ) represents Radon spectrum, and * represents convolution operation.

[0076] Furthermore, in order to evaluate the accuracy of the method in the above embodiment, step S4 is followed by step S5, which specifically includes: placing the target image in an M*N square matrix, recording the edge point coordinates of the target image, and calculating the root mean square error (RMSE) with the target contour point coordinates obtained in steps S1-S4. The calculation formula of the RMSE is as follows:

[0077]

[0078] like Figure 4 As shown, in another embodiment of the present invention, a single-pixel edge detection device is also disclosed, and the detection device includes:

[0079] A modulation unit, configured to generate a two-dimensional modulation information matrix A, and translate the two-dimensional modulation information matrix A by one unit to obtain a two-dimensional modulation information matrix B;

[0080] A light source is used to modulate light information according to the two-dimensional modulation information matrices A and B generated by the modulation unit and then illuminate the target object;

[0081] a detector for respectively detecting the total intensity values ​​of the light signals of the two groups of modulated illumination lights after they penetrate the target object or are reflected by the target object, thereby obtaining the total intensity values ​​of the two groups of light signals;

[0082] a calculation unit, configured to calculate edge information of the target object using a reconstruction algorithm based on the two sets of light signal intensity values;

[0083] The display unit is used to display the outline of the target object.

[0084] In another embodiment of the present invention, a computer-readable storage medium is disclosed. A computer program is stored on the medium. When the computer program is run, the single-pixel edge detection method described in any one of the above embodiments is executed.

[0085] Another embodiment of the present invention further discloses a computer device, including a processor and a storage medium, wherein a computer program is stored on the storage medium. The processor reads and runs the computer program from the storage medium to execute the single-pixel edge detection method as described in any one of the above embodiments.

[0086] Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A single pixel edge detection method, characterized in that: The edge detection method comprises the following steps: Step S1: Generate a two-dimensional modulation information matrix A, and translate the two-dimensional modulation information matrix A by one unit to obtain a two-dimensional modulation information matrix B; Step S2: modulating the illumination light using the two-dimensional modulation information matrix A and the two-dimensional modulation information matrix B respectively; Step S3: respectively detecting the total intensity values ​​of the light signals of the two groups of modulated illumination lights after they penetrate the target object or are reflected by the target object, to obtain two groups of total intensity values ​​of the light signals; Step S4: Calculating edge information of the target object using a reconstruction algorithm based on the two sets of total intensity values ​​of the light signals; The expression of each matrix in the two-dimensional modulation information matrix A is as follows: p 0 (x,y,L,θ)=h R (L)δ(xcosθ+ysinθ-L) The expression of each matrix in the two-dimensional modulation information matrix B is as follows: p t (x,y;L,θ)=p 0 (x,y:L+1,θ) Among them, p 0 (x, y; L, θ) is the element value corresponding to the coordinate (x, y) in the two-dimensional matrix, h R (L) is equal to the value of the Rth row and the [L]th column in the Hadamard matrix, where [L] is the largest integer not greater than L, δ is the Dirac function, and θ is the angle with the x-axis; The step S4 specifically includes the following steps: Step S41: Calculating gradient information based on the total intensity values ​​of the two sets of optical signals; Step S42: Calculate all Radon spectra of the gradients with angles in the positive direction of the abscissa ranging from 0 to 179 degrees based on the gradient information, and arrange them in order of angles to obtain Radon spectra of the gradients; Step S43: Calculate edge information of the target object using a filtered back projection algorithm according to the Radon spectrum.

2. The single-pixel edge detection method according to claim 1, characterized in that: The step S2 specifically includes the following steps: Step S21: sending the two-dimensional modulation information matrix A and the two-dimensional modulation information matrix B to an imaging system to generate two sets of modulated illumination lights; Step S22: irradiating the target object with the two sets of modulated illumination lights in sequence; Step S23: receiving a light signal of the illumination light penetrating the target object or reflected by the target object.

3. The single-pixel edge detection method according to claim 1, wherein: The calculation method of the total intensity value of the optical signal obtained after modulation by the two-dimensional modulation information matrix A in step S3 is as follows: The total intensity value of the optical signal obtained after modulation by the two-dimensional modulation information matrix B is calculated as follows: Among them, f(x,y) is the two-dimensional distribution function of the target object.

4. The single-pixel edge detection method according to claim 1, wherein: The expression for calculating the edge information of the target object based on the Radon spectrum is as follows: Where B represents the back-projection operator, S represents the filter function, and F -1 t represents inverse Fourier transform, F'(L,θ) represents Radon spectrum, and * represents convolution operation.

5. The single-pixel edge detection method according to claim 1, wherein: After step S4, the following steps are also included Step S5: Place the target image in an M*N square matrix, record the edge point coordinates of the target image, and calculate the root mean square error with the target contour point coordinates obtained in steps S1-S4.

6. A computer-readable storage medium, characterized in that A computer program is stored on the medium, and after the computer program is run, the single-pixel edge detection method according to any one of claims 1 to 5 is executed.

7. A computer device, characterized in that: The method comprises a processor and a storage medium, wherein a computer program is stored in the storage medium, and the processor reads and runs the computer program from the storage medium to execute the single-pixel edge detection method according to any one of claims 1 to 5.