Anti-interference single-pixel imaging edge detection method and system
By convolving the Hadamard basis pattern with the second-order differential operator to generate a modulation pattern, the object edge is directly extracted, which solves the problem that traditional edge detection is affected by image quality and ambient light, and realizes fast and high-quality single-pixel imaging edge detection.
Patent Information
- Application Number
- CN202211737269.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-12-30
AI Technical Summary
Traditional edge detection technology is limited by image quality, has a low signal-to-noise ratio, and ambient light interference seriously affects the detection effect. The existing single-pixel imaging edge detection method takes a long time and has an insufficient signal-to-noise ratio.
The modulation pattern is generated by convolution of the Hadamard basis pattern and the second-order differential operator. The edge of the object is directly extracted through a single-pixel detector. A differential and single-step edge-sensitive single-pixel imaging scheme is designed to resist ambient light interference and reduce the number of modulation patterns.
It achieves fast and high-quality edge detection, reduces the modulation pattern by half, improves the signal-to-noise ratio, can accurately extract the edge of the object under the interference of ambient light, and avoids the limitation of image imaging quality.
Smart Images

Figure CN115953423B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of edge detection, and in particular to an anti-interference single-pixel imaging edge detection method and system. Background Art
[0002] Traditional edge detection techniques first capture an image of the object and then perform edge detection based on the resulting image. Proposed edge detection techniques based on single-pixel imaging often use grayscale modulation patterns. When using the DMD high-speed modulation mode, the grayscale modulation pattern must be binarized. This binarization introduces errors that severely impact the signal-to-noise ratio of edge detection.
[0003] In traditional digital image processing, edge detection is performed after image formation. Therefore, the quality of edge detection is limited by the quality of the image itself. Existing edge detection techniques based on single-pixel imaging require a large number of modulation patterns to detect the edge of an object, which results in a long detection time. Existing edge detection methods using single pixels often have a low signal-to-noise ratio, making them difficult to meet the practical requirements of edge detection. Summary of the Invention
[0004] The present invention proposes an anti-interference single-pixel imaging edge detection method and system, which can solve at least one of the above technical problems.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] An anti-interference single-pixel imaging edge detection method comprises the following steps:
[0007] In edge-sensitive single-pixel imaging, ESI modulation mode is achieved by + (x,y) and 1-P + (x, y) is generated by performing a convolution operation with a second-order differential operator, that is,
[0008]
[0009] in Represents the convolution operation, k(x,y) is the convolution kernel of the second-order differential operator, P + (x,y) is the Hadamard base pattern, obtained by formula (2),
[0010]
[0011] (x, y) and (u, v) are the coordinates of the spatial domain and the Hadamard domain respectively, H -1 (·) represents the inverse Hadamard transform;
[0012] A series of modulation patterns Q generated by formula (1) + (x,y) and Q - (x,y) is projected onto the target object using a DMD, and the single-pixel detector collects the light intensity signal reflected or transmitted from the object. When the set modulation mode is used to illuminate the object, the acquired spectrum is calculated by the following formula:
[0013] H(u,v)=B +1 (u,v)-B -1 (u,v) (3)
[0014] Among them B +1 (u,v) and B -1 (u,v) is the value corresponding to Q + (x,y) and Q - The edge of the object is directly obtained by performing an inverse Hadamard transform on H(u,v) using the measured value of the (x,y) modulation pattern illumination. Formula (3) is a differential operation, so it has the ability to resist interference from external ambient light. On the other hand, the present invention also discloses an anti-interference single-pixel imaging edge detection method, comprising the following steps:
[0015] In edge-sensitive single-pixel imaging, SESI modulation mode only needs to be adjusted by P + (x, y; u, v) is generated by performing convolution operation with the second-order differential operator, that is,
[0016]
[0017] in represents the convolution operation, k(x,y) is the differential operator convolution kernel; a series of modulation patterns Q generated by formula (4) + (x, y) is projected onto the target object using DMD, and the single-pixel detector collects the light intensity signal reflected or transmitted from the object; when only the modulation pattern designed by formula (4) is used to illuminate the object, the B +1 (u,v) spectrum H obtained + (u, v) and subtracting the average value of its spectrum itself to obtain the Hadamard spectrum of the object edge, that is,
[0018]
[0019] The edge of the object can be directly obtained by performing an inverse Hadamard transform on H(u,v); the spectrum average value in formula (5) can offset the influence of ambient light, making this method more resistant to environmental interference.
[0020] On the other hand, the present invention further discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the above method.
[0021] It can be seen from the above technical solution that the key to the present invention is to use the convolution result of the Hadamard basis pattern and the second-order differential operator, that is, the edge of the Hadamard basis pattern as a modulation pattern, and to directly extract the edge of the unknown object without any prior imaging. Among them, the ESI scheme is a differential edge-sensitive single-pixel imaging edge detection scheme that can effectively suppress noise and eliminate static light interference, which is impossible with traditional imaging methods. The SESI scheme is a single-step edge detection scheme. Although it is non-differential, it can still eliminate static light interference, and compared with the existing edge detection method based on single-pixel imaging, the modulation pattern required for edge detection is reduced by at least half.
[0022] Compared to traditional digital image processing methods, the edge detection technology proposed in this invention can directly detect the edges of objects without prior imaging, and is therefore not limited by the quality of the object image. When there is ambient light interference, the results of traditional edge detection methods that first image and then perform edge detection are significantly affected. However, because the direct edge detection method proposed in this invention pre-programs the edge detection into the coding pattern, which only modulates the object and not the interfering light, the interference of ambient light does not significantly affect the results of direct edge detection.
[0023] Compared with the existing edge detection technology based on single-pixel imaging, the SESI scheme in the edge detection technology proposed in the present invention can realize single-step edge detection, reducing the modulation pattern required for edge detection by at least half, greatly improving the speed of edge detection; in addition, the edge detection technology proposed in the present invention can extract the edge of the object with high quality, and the required modulation pattern is binarized, and will not introduce errors due to the binarization of the modulation pattern, affecting the quality of edge detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a schematic diagram of the principle of an embodiment of the present invention;
[0025] Figure 2 is a schematic diagram of an experimental device according to an embodiment of the present invention;
[0026] Figure 3 1 is a simulation result diagram of an embodiment of the present invention;
[0027] Figure 4 Schematic diagram of experimental results of an embodiment of the present invention;
[0028] Figure 5 5(a) is a diagram of the experimental scene under severe light interference of an embodiment of the present invention, wherein 5(b) is a diagram of the experimental scene under light interference, and 5(a) is a diagram of the imaging result of a traditional camera;
[0029] Figure 6 1 is a diagram of experimental results under light interference of an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the 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.
[0031] like Figure 1 FIG. 1 is a schematic diagram showing the principle of the single-pixel imaging edge detection method described in this embodiment. Since traditional single-pixel imaging obtains a target image by projecting a corresponding modulated base pattern, and uses the light intensity sampled by a single-pixel detector to reconstruct the target image through inverse transformation or compressed sensing recovery method, as shown in FIG. Figure 1 As shown in (a), it is the Hadamard base pattern used. In order to obtain the edge of the image, the traditional image processing method is to apply the edge detection algorithm to the image, so the quality of edge detection depends to a large extent on the quality of the image. In order to solve this problem, the present invention carefully designs a series of edge-sensitive single-pixel imaging coding modulation patterns to directly extract the edges of unknown objects without obtaining any prior images of the objects in advance. The edge-sensitive modulation pattern is designed by convolving the Hadamard base pattern with the second-order differential operator. As shown in Figure 1 As shown in (b) and (c), two types of edge-sensitive modulation patterns are designed by convolving the Laplacian or LoG operator with the Hadamard basis pattern, respectively. This method can obtain the Hadamard spectrum of an object's edge by projecting a series of edge-sensitive modulation patterns, and directly obtain the object's edge image through an inverse Hadamard transform, without the need for prior imaging.
[0032] The following are specific instructions:
[0033] The edge detection technology proposed in the present invention includes two schemes: a differential edge-sensitive single-pixel imaging scheme (ESI) and a single-step edge-sensitive single-pixel imaging scheme (SESI).
[0034] Solution 1: Differential edge-sensitive single-pixel imaging (ESI)
[0035] In edge-sensitive single-pixel imaging, ESI modulation mode is achieved by + (x,y) and 1-P + (x, y) is generated by performing a convolution operation with a second-order differential operator, that is,
[0036]
[0037] in Represents the convolution operation, k(x,y) is the convolution kernel of the second-order differential operator, P + (x,y) is the Hadamard base pattern, which can be obtained by formula (2),
[0038]
[0039] (x, y) and (u, v) are the coordinates of the spatial domain and the Hadamard domain respectively, H -1 (·) represents the inverse Hadamard transform.
[0040] A series of modulation patterns Q generated by formula (1) + (x,y) and Q - (x,y) is projected onto the target object using a DMD, and the single-pixel detector collects the light intensity signal reflected (or transmitted) from the object. When the newly designed modulation pattern is used to illuminate the object, the acquired spectrum can be calculated by the following formula:
[0041] H(u,v)=B +1 (u,v)-B -1 (u,v) (3)
[0042] Among them B +1 (u,v) and B -1 (u,v) is the value corresponding to Q + (x,y) and Q - The edge of the object can be directly obtained by performing an inverse Hadamard transform on H(u,v) based on the measured value of the (x,y) modulation pattern illumination.
[0043] Solution 2: Single-step edge-sensitive single pixel imaging (SESI)
[0044] In edge-sensitive single-pixel imaging, SESI modulation mode only needs to be adjusted by P + (x, y; u, v) is generated by performing convolution operation with the second-order differential operator, that is,
[0045]
[0046] in represents the convolution operation, k(x,y) is the differential operator convolution kernel. In the present invention, k(x,y) can be a first-order or second-order differential operator or other operators. A series of modulation patterns Q generated by formula (4) + (x, y) is projected onto the target object using DMD, and the single-pixel detector collects the light intensity signal reflected (or transmitted) from the object. When only the modulation pattern designed by formula (4) is used to illuminate the object, the B +1 (u,v) spectrum H obtained +(u, v) and subtract the average value of its spectrum itself to obtain the Hadamard spectrum of the object edge, that is,
[0047]
[0048] Performing an inverse Hadamard transform on H(u,v) directly retrieves the edge of the object. SESI requires only half the modulation pattern of ESI, reducing the edge detection time by half.
[0049] The edge detection system of the present invention is as follows Figure 2 As shown. For the ESI scheme, DMD generates a series of modulation patterns Q designed by formula (1) + (x,y) and Q - (x, y); For the SESI scheme, DMD only needs to generate a series of modulation patterns Q designed by formula (4) + The DMD projects the modulated pattern onto the target object. The one-dimensional light intensity signal reflected (or transmitted) from the object is detected by a single-pixel detector and converted into an electrical signal. The data acquisition card inputs the collected signal into a computer, and the corresponding reconstruction algorithm directly reconstructs the edge image of the object.
[0050] Figure 3 The simulation results of the edge detection scheme proposed in this invention are shown. When using the Laplace operator and the LoG operator as convolution kernels, the ESI scheme is called LESI and GESI, respectively. For SESI, they are called LSESI and GSESI, respectively. In the simulation, the modulation pattern is binarized based on upsampling and Floyd-Steinberg error diffusion dithering. The binarized modulation pattern allows us to utilize the high-speed modulation mode provided by the DMD, which helps reduce edge detection time. The simulation results show that binarization does not affect the edge detection results of the proposed edge detection scheme.
[0051] Figure 4 The experimental results of the edge detection scheme proposed in this invention are shown. We directly detect the edge of the object without any prior imaging and have a high signal-to-noise ratio.
[0052] Figure 5 (a) shows the experimental scene diagram of the edge detection scheme proposed in this invention under severe light interference, in which a laser generates a light spot and shines it on the object to simulate severe ambient light interference. The traditional edge detection method is to acquire an object image through a camera and then perform edge detection. However, when the camera acquires the object image, it is inevitably interfered by the ambient light, such as Figure 5 (b) shown.
[0053] Figure 6The experimental results of the edge detection scheme proposed in this invention and the traditional edge detection results under severe light interference are shown. The traditional edge detection results first obtain the object image through the camera, and then use the LoG edge detection algorithm to extract the edge. LESI, GESI, LSESI and GSESI are the image edges directly obtained by the method proposed in this invention. Figure 6 The results show that traditional edge detection algorithms cannot eliminate light interference and will detect false edges that are not object edges due to light interference. However, the edge detection methods proposed in this paper, whether the differential ESI edge detection scheme or the single-step SESI edge detection scheme, can eliminate the influence of light interference and accurately detect the true edges of objects.
[0054] At the same time, the convolutional single-pixel imaging basis pattern described in this embodiment can be a Hadamard, Fourier, or Wavelet basis pattern; the convolution operator used can also be a first-order differential operator, such as Roberts, Prewitt, and Sobel edge detection operators or other operators. The projection device can use a projector, LCD, DMD, or other spatial light modulators to modulate the projection pattern; the photodetector can be replaced by a photoelectric device that responds to light intensity information, such as a photocell or photodiode. The edge detection system device of the present invention can adopt a passive structural imaging method.
[0055] In summary, the edge detection technology proposed in the present invention does not require any prior imaging of the object and can directly detect the edge of the object. The present invention specifically designs a series of edge-sensitive modulation patterns for directly extracting the edges of unknown objects. The modulation pattern is obtained by convolving a second-order differential operator with a Hadamard code basis pattern. The modulation pattern designed by the edge detection technology proposed in the present invention is binary and can be well adapted to the high-speed modulation mode of the DMD, thereby enabling rapid and direct detection of the edges of unknown objects and having high noise robustness.
[0056] The edge detection technology proposed in this paper can directly detect the edges of objects without prior imaging, and is therefore not limited by the quality of the object imaged. Furthermore, the ESI scheme in this invention's edge detection technology is a differential detection scheme that effectively suppresses noise and eliminates light interference in the environment, which is difficult to achieve with traditional image processing methods.
[0057] The SESI scheme in the edge detection technology proposed in the present invention can realize single-step edge detection, reducing the modulation pattern required for edge detection by at least half, and greatly improving the speed of edge detection;
[0058] The edge detection technology proposed in the present invention can extract the edge of an object with high quality, and the required modulation pattern is binarized, so no error is introduced due to the binarization of the modulation pattern, thereby affecting the quality of edge detection.
[0059] The single-pixel imaging edge detection method of the present invention can directly extract the edge of an object without taking any pictures of the object. The differential edge-sensitive single-pixel imaging (ESI) technology proposed in the present invention can effectively suppress noise and greatly improve the signal-to-noise ratio of edge detection. In addition, a single-step edge-sensitive single-pixel imaging (SESI) method is developed based on ESI. Compared with other edge detection methods based on single-pixel imaging, this method shortens the detection time by half. In addition, the modulation pattern used in the edge detection technology proposed in the present invention is binary and is almost unaffected by the quantization error of the modulation pattern. Therefore, when using the high-speed modulation mode of a digital micromirror device (DMD) for fast and high-quality edge detection, the edge detection scheme proposed in the present invention has obvious advantages.
[0060] In another aspect, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of any of the above methods.
[0061] On the other hand, the present invention further discloses a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any of the above methods.
[0062] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the steps of any one of the methods in the above embodiments.
[0063] It is understandable that the system provided by the embodiment of the present invention corresponds to the method provided by the embodiment of the present invention, and the explanation, examples and beneficial effects of the relevant contents can refer to the corresponding parts of the above method.
[0064] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0065] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0066] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. 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. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. An anti-interference single-pixel imaging edge detection method, characterized in that: The following steps are included: In edge-sensitive single-pixel imaging, ESI modulation mode is achieved by + (x,y) and 1-P + (x, y) is generated by performing a convolution operation with a second-order differential operator, that is, in Represents the convolution operation, k(x,y) is the convolution kernel of the second-order differential operator, P + (x,y) is the Hadamard base pattern, obtained by formula (2), (x, y) and (u, v) are the coordinates of the spatial domain and the Hadamard domain respectively, H -1 (·) represents the inverse Hadamard transform; A series of modulation patterns Q generated by formula (1) + (x,y) and Q - (x,y) is projected onto the target object using a DMD, and the single-pixel detector collects the light intensity signal reflected or transmitted from the object. When the set modulation mode is used to illuminate the object, the acquired spectrum is calculated by the following formula: H(u,v)=B +1 (u,v)-B -1 (u,v) (3) Among them B +1 (u,v) and B -1 (u,v) is the value corresponding to Q + (x,y) and Q - The measured value of the (x, y) modulation pattern illumination is used to directly obtain the edge of the object by performing an inverse Hadamard transform on H(u, v). Formula (3) is a differential operation, so it has the ability to resist interference from external ambient light.
2. An anti-interference single-pixel imaging edge detection method, characterized by: The following steps are included: In edge-sensitive single-pixel imaging, SESI modulation mode only needs to be adjusted by P + (x, y) is generated by performing a convolution operation with a second-order differential operator, that is, in represents the convolution operation, k(x,y) is the differential operator convolution kernel; a series of modulation patterns Q generated by formula (4) + (x,y) is projected onto the target object using a DMD, and the single-pixel detector collects the light intensity signal reflected or transmitted from the object; When only the modulation pattern designed by formula (4) is used to illuminate the object, +1 (u,v) spectrum H obtained + (u, v) and subtracting the average value of its spectrum itself to obtain the Hadamard spectrum of the object edge, that is, By performing an inverse Hadamard transform on H(u,v), the edge of the object can be directly obtained; the spectrum average in formula (5) can offset the influence of ambient light.
3. The single-pixel imaging edge detection method according to claim 2, wherein: The k(x, y) is a first-order or second-order differential operator.
4. A computer system storing a computer program, wherein when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 3.