Image coding method, device, reconstruction device and storage medium

By generating a one-dimensional discrete W transformation matrix and a two-dimensional impulse function value, the encoded image is generated and light modulated, which solves the problem of low image quality at low sampling rates in the existing technology and achieves faster image reconstruction speed. and higher quality.

CN115334319BActive Publication Date: 2024-10-11WUYI UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202210851594.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-20
Publication Date
2024-10-11
Estimated Expiration
2042-07-20

AI Technical Summary

Technical Problem

Existing encoding methods for single-pixel imaging produce low-quality images at low sampling rates. In particular, the reconstructed image has a low signal-to-noise ratio, low resolution, and long computing time.

Method used

By generating a one-dimensional discrete W transformation matrix and a two-dimensional impulse function value, the encoded image is generated based on these matrices and function values, and is loaded into the beam through the light modulator. The light intensity value is collected using a single-pixel detector, and finally passed through the processor Perform inverse W transformation to obtain the reconstructed image.

Benefits of technology

The image reconstruction speed and quality are improved, and the peak signal-to-noise ratio and structural similarity index of the reconstructed image are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115334319B_ABST
    Figure CN115334319B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide an image coding method, an apparatus, a reconstruction device, and a storage medium, which generate a one-dimensional discrete W transformation matrix according to the number of matrix rows; generate a two-dimensional impulse function value according to the number of matrix rows; generate a coded image according to the one-dimensional discrete W transformation matrix and the two-dimensional impulse function value; by setting different numbers of matrix rows, different one-dimensional discrete W transformation matrices and two-dimensional impulse function values ​​can be generated, thereby generating different coded images; and the image reconstruction speed can be improved and the quality of the reconstructed image can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to but are not limited to the field of image processing, and in particular to image encoding methods, devices, reconstruction equipment and storage media. Background Art

[0002] The existing single-pixel imaging coding methods mainly include random Gaussian matrix coding, binary sparse matrix coding, Hadamard matrix coding and Fourier matrix coding. The random Gaussian matrix coding is simple to generate, but the quality of the restored image is poor at low sampling rates, and this type of coding consumes a lot of memory. Binary sparse matrix coding generally needs to be used in conjunction with a compressed sensing algorithm, the imaging quality is poor, and the image recovery time increases exponentially with the number of pixels. The image restored by Hadamard matrix coding at a low sampling rate has a serious mosaic effect and cannot distinguish image details. The image restored by Fourier matrix coding at a low sampling rate has a ringing effect and low resolution, and the Fourier matrix is ​​a complex matrix, and the operation time is long. The reconstructed images reconstructed by these coding methods at low sampling rates have a low signal-to-noise ratio and low resolution, which affects the quality of the reconstructed image. Summary of the invention

[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0004] The embodiments of the present application provide an image encoding method, an apparatus, a reconstruction device and a storage medium, which can increase the image reconstruction speed and improve the quality of the reconstructed image.

[0005] A first aspect of the present invention provides an image encoding method, comprising:

[0006] Set the number of matrix rows;

[0007] Generate a one-dimensional discrete W transformation matrix according to the number of rows of the matrix;

[0008] Generate a two-dimensional impulse function value according to the number of rows of the matrix;

[0009] A coded image is generated according to the one-dimensional discrete W transformation matrix and the two-dimensional impulse function value.

[0010] In some embodiments, the generating of a one-dimensional discrete W transformation matrix is ​​represented by the following formula: Wherein, W is the one-dimensional discrete W transformation matrix, n is the number of rows of the matrix, and a and b are both one-dimensional vectors with a value range of (0, n-1).

[0011] In some embodiments, generating a two-dimensional impulse function value is represented by the following formula: Among them, δ(u,v) is the value of the two-dimensional impulse function, u∈(1,n), v∈(1,n), u0 and v0 are preset values, u0∈u, v0∈v.

[0012] In some embodiments, the generating of the encoded image is represented by the following formula: P(x, y; u, v) = W T *δ(u,v)*W, where P(x,y;u,v) is the coded image, x is the horizontal coordinate of the spatial coordinate of the coded image, y is the vertical coordinate of the spatial coordinate of the coded image, and W T is the transpose of the one-dimensional discrete W transformation matrix.

[0013] A second aspect of the present invention provides an image encoding device, comprising:

[0014] A row number setting unit is used to set the number of matrix rows;

[0015] A first generating unit, configured to generate a one-dimensional discrete W transformation matrix according to the number of rows of the matrix;

[0016] A second generating unit, used for generating a two-dimensional impulse function value according to the number of rows of the matrix;

[0017] The third generating unit is used to generate a coded image according to the one-dimensional discrete W transformation matrix and the two-dimensional impulse function value.

[0018] In some embodiments, the one-dimensional discrete W transformation matrix generated by the first generating unit is expressed by the following formula: Wherein, W is the one-dimensional discrete W transformation matrix, n is the number of rows of the one-dimensional discrete W transformation matrix, and a and b are both one-dimensional vectors with a value range of (0, n-1).

[0019] In some embodiments, the second generating unit generates a two-dimensional impulse function value represented by the following formula: Among them, δ(u,v) is the value of the two-dimensional impulse function, u∈(1,n), v∈(1,n), u0 and v0 are preset values, u0∈u, v0∈v.

[0020] In some embodiments, the third generation unit generates a coded image represented by the following formula: P(x, y; u, v) = W T *δ(u,v)*W, where P(x,y;u,v) is the coded image, x is the horizontal coordinate of the spatial coordinate of the coded image, y is the vertical coordinate of the spatial coordinate of the coded image, and W T is the transpose of the one-dimensional discrete W transformation matrix.

[0021] A third aspect of the present invention provides an image reconstruction device, comprising a light source generator, a light modulator, a first lens, a second lens, a single pixel detector, a processor, and the image encoding device as described above;

[0022] Wherein, the optical modulator is used to load the coded image generated by the image coding device;

[0023] The light source generator is used to generate a light beam, and the light beam passes through the light modulator, the first lens, the object to be measured, the second lens and the single-pixel detector in sequence;

[0024] The single pixel detector is used to obtain a light intensity value according to the light beam;

[0025] The processor is configured to obtain a reconstructed image according to the light intensity value.

[0026] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, storing computer-executable instructions, wherein the computer-executable instructions are used to execute the image encoding method as described above.

[0027] This solution has at least the following beneficial effects: generating a one-dimensional discrete W transformation matrix according to the number of matrix rows; generating a two-dimensional impulse function value according to the number of matrix rows; generating a coded image according to the one-dimensional discrete W transformation matrix and the two-dimensional impulse function value; by setting different numbers of matrix rows, different one-dimensional discrete W transformation matrices and two-dimensional impulse function values ​​can be generated, thereby generating different coded images; and the image reconstruction speed can be increased and the quality of the reconstructed image can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.

[0029] Figure 1 is a step diagram of an image encoding method provided by an embodiment of the present invention;

[0030] Figure 2 is a structural diagram of an image encoding device provided by an embodiment of the present invention;

[0031] Figure 3 is a schematic diagram of an image reconstruction device provided by an embodiment of the present invention;

[0032] Figure 4 It is a schematic diagram of the reconstructed image obtained by reconstructing the original image. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0034] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims or the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0035] Single-pixel imaging is an imaging technology developed from computational ghost imaging. Single-pixel imaging uses a coding method to achieve structured light illumination at the illumination end, and uses a single-pixel light intensity detector to collect signals at the detection end. Multiple detection signals are obtained by continuously changing the coded image, and finally the reconstructed imaging of the object to be measured is achieved.

[0036] Single-pixel cameras are based on the principle of correlation measurement and only rely on collecting light intensity information to image objects. Single-pixel cameras use structured light illumination at the illumination end and use single-pixel light intensity detectors at the detection end to collect signals. When the illumination structure changes, the corresponding change in the object light intensity reflects the degree of correlation between the illumination structure and the object's spatial information. By continuously changing the illumination structure and accumulating correlation information, the imaging of the object is ultimately achieved. Since single-pixel cameras only need light intensity detection at the detection end, their requirements for detectors are much lower than those of array detectors in ordinary imaging.

[0037] Single-pixel imaging is a new imaging mechanism that obtains object information based on high-order correlation of light fields. It has the characteristics of breaking through the diffraction limit of classical imaging, non-locality, and being unaffected by light path disturbances. By setting a better coded image, the energy of the imaged object can be concentrated in a specific transform domain, achieving compressed sampling.

[0038] The embodiments of the present application are further described below in conjunction with the accompanying drawings.

[0039] Reference Figure 1 , an embodiment of the present application provides an image encoding method, comprising:

[0040] Step S100, setting the number of matrix rows;

[0041] Step S200, generating a one-dimensional discrete W transformation matrix according to the number of matrix rows;

[0042] Step S300, generating a two-dimensional impulse function value according to the number of matrix rows;

[0043] Step S400: Generate a coded image according to the one-dimensional discrete W transformation matrix and the two-dimensional impulse function value.

[0044] Matrix functions can be set manually or generated randomly.

[0045] Specifically, the one-dimensional discrete W transformation matrix is ​​generated by the following formula: Where W is a one-dimensional discrete W transformation matrix, n is the number of matrix rows, and a and b are both one-dimensional vectors with a value range of (0, n-1).

[0046] By setting different numbers of matrix rows n and taking different values ​​for a and b, different one-dimensional discrete W transformation matrices W can be generated.

[0047] Specifically, the generated two-dimensional impulse function value is expressed by the following formula: Among them, δ(u,v) is the value of the two-dimensional impulse function, u∈(1,n),v∈(1,n),u0 and v0 are preset values, u0∈u, v0∈v.

[0048] By setting different numbers of matrix rows n and taking different values ​​for u0 and v0, different two-dimensional impulse function values ​​δ(u,v) can be generated.

[0049] In some embodiments, generating a coded image is represented by the following equation: P(x, y; u, v) = W T *δ(u,v)*W, where P(x,y;u,v) is the coded image, x is the horizontal coordinate of the spatial coordinate of the coded image, y is the vertical coordinate of the spatial coordinate of the coded image, and W T is the transpose of the one-dimensional discrete W transformation matrix.

[0050] By setting different matrix row numbers n, different one-dimensional discrete W transformation matrices W and different two-dimensional impulse function values ​​δ(u, v) are obtained, thereby obtaining different coded images.

[0051] The operation of the image coding method is based on a one-dimensional discrete W transformation matrix, a two-dimensional impulse function value and a matrix transpose. The operation is simple and is conducive to improving the coding speed.

[0052] Reference Figure 2 The embodiment of the present invention further provides an image encoding device 10. The image encoding device 10 includes a line number setting unit 100, a first generating unit 200, a second generating unit 300 and a third generating unit 400.

[0053] Among them, the row number setting unit 100 is used to set the number of matrix rows; the first generation unit 200 is used to generate a one-dimensional discrete W transformation matrix according to the number of matrix rows; the second generation unit is used to generate a two-dimensional impulse function value according to the number of matrix rows; the third generation unit 400 is used to generate a coded image according to the one-dimensional discrete W transformation matrix and the two-dimensional impulse function value.

[0054] Specifically, the one-dimensional discrete W transformation matrix generated by the first generating unit 200 is expressed by the following formula: Wherein, W is a one-dimensional discrete W transformation matrix, n is the number of rows of the one-dimensional discrete W transformation matrix, and a and b are both one-dimensional vectors with a value range of (0, n-1).

[0055] By setting different numbers of matrix rows n and taking different values ​​for a and b, different one-dimensional discrete W transformation matrices W can be generated.

[0056] Specifically, the two-dimensional impulse function value generated by the second generating unit 300 is expressed by the following formula: Among them, δ(u,v) is the value of the two-dimensional impulse function, u∈(1,n),v∈(1,n),u0 and v0 are preset values, u0∈u, v0∈v.

[0057] By setting different numbers of matrix rows n and taking different values ​​for u0 and v0, different two-dimensional impulse function values ​​δ(u,v) can be generated.

[0058] Specifically, the third generation unit 400 generates a coded image represented by the following formula: P(x, y; u, v) = W T *δ(u,v)*W, where P(x,y;u,v) is the coded image, x is the horizontal coordinate of the spatial coordinate of the coded image, y is the vertical coordinate of the spatial coordinate of the coded image, and W T is the transpose of the one-dimensional discrete W transformation matrix.

[0059] By setting different matrix row numbers n, different one-dimensional discrete W transformation matrices W and different two-dimensional impulse function values ​​δ(u, v) are obtained, thereby obtaining different coded images.

[0060] Reference Figure 3 The embodiment of the present invention further provides an image reconstruction device, which includes a light source generator 20, a light modulator 30, a first lens 40, a second lens 60, a single pixel detector 70, a processor, and the above image encoding device 10.

[0061] Among them, the optical modulator 30 is used to load the encoded image generated by the image encoding device 10; the light source generator is used to generate a light beam, and the light beam passes through the optical modulator 30, the first lens 40, the object to be measured 50, the second lens 60 and the single-pixel detector 70 in sequence; the single-pixel detector 70 is used to obtain the light intensity value according to the light beam; the processor is configured to obtain a reconstructed image according to the light intensity value.

[0062] The light source generator 20 is specifically a laser. The laser generated by the light source generator 20 passes through the light modulator 30 and is modulated by the coded image loaded on the light modulator 30. The image coding device 10 generates a one-dimensional discrete W transformation matrix according to the number of matrix rows, generates a two-dimensional impulse function value according to the number of matrix rows, and generates a coded image according to the one-dimensional discrete W transformation matrix and the two-dimensional impulse function value. The coded images are loaded onto the light modulator 30 to modulate the optical path.

[0063] The modulated light beam is focused onto the object to be tested 50 through the first lens 40. The object to be tested 50 may be a light-transmitting object printed with an original image. The light beam passing through the object to be tested 50 is focused onto the single-pixel detector 70 through the second lens 60. The single-pixel detector 70 obtains a series of light intensity values ​​according to the light beam.

[0064] Specifically, the processor performs an inverse W transformation on the light intensity value to obtain the reconstructed image. Since the reconstructed image can be obtained by performing an inverse W transformation on the light intensity value only once, it is beneficial to improve the image reconstruction speed.

[0065] Reference Figure 4 , the left one is the original image, and the right one is the reconstructed image. This coding method is applied to the original image with a resolution of 128×128, and the sampling rate is set to 0.10. It can be seen that the reconstructed image obtained by the above image coding method has good performance in both peak signal to noise ratio (PSNR) and structural similiarity index (SSIM). Therefore, this image coding method can help improve the quality of the reconstructed image.

[0066] An embodiment of the present invention further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the above image encoding method.

[0067] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0068] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the embodiments. Technical personnel familiar with the field can make various equivalent deformations or substitutions without violating the spirit of the present application, and these equivalent deformations or substitutions are all included in the protection scope of the present application.

Claims

1. An image coding method, characterized in that: include: Set the number of matrix rows; Generate a one-dimensional discrete W transformation matrix according to the number of rows of the matrix; Generate a two-dimensional impulse function value according to the number of rows of the matrix; Generate a coded image according to the one-dimensional discrete W transformation matrix and the two-dimensional impulse function value; Wherein, the generation of a one-dimensional discrete W transformation matrix is ​​expressed by the following formula: ,in, is the one-dimensional discrete W transformation matrix, n is the number of rows in the matrix, and a and b are both one-dimensional vectors with a value range of (0, n-1); The generated two-dimensional impulse function value is expressed by the following formula: ,in, is the value of the two-dimensional impulse function, u∈(1,n),v∈(1,n), and is the default value, u, ∈v; The generated coded image is represented by the following formula: P(x, y; ) , where P(x,y; ) is the coded image, x is the abscissa of the spatial coordinates of the coded image, y is the ordinate of the spatial coordinates of the coded image, is the transpose of the one-dimensional discrete W transformation matrix.

2. An image encoding device, characterized in that: include: A row number setting unit is used to set the number of matrix rows; A first generating unit, configured to generate a one-dimensional discrete W transformation matrix according to the number of rows of the matrix; A second generating unit, used for generating a two-dimensional impulse function value according to the number of rows of the matrix; A third generating unit, configured to generate a coded image according to the one-dimensional discrete W transformation matrix and the two-dimensional impulse function value; The one-dimensional discrete W transformation matrix generated by the first generating unit is expressed by the following formula: ,in, is the one-dimensional discrete W transformation matrix, n is the number of rows of the one-dimensional discrete W transformation matrix, and a and b are both one-dimensional vectors with a value range of (0, n-1); The second generating unit generates a two-dimensional impulse function value represented by the following formula: ,in, is the value of the two-dimensional impulse function, u∈(1,n),v∈(1,n), and is the default value, u, ∈v; The third generation unit generates a coded image represented by the following formula: P(x, y; ) , where P(x,y; ) is the coded image, x is the abscissa of the spatial coordinates of the coded image, y is the ordinate of the spatial coordinates of the coded image, is the transpose of the one-dimensional discrete W transformation matrix.

3. An image reconstruction device, characterized in that: The device comprises a light source generator, a light modulator, a first lens, a second lens, a single pixel detector, a processor and the image encoding device as claimed in claim 2; Wherein, the optical modulator is used to load the coded image generated by the image coding device; The light source generator is used to generate a light beam, and the light beam passes through the light modulator, the first lens, the object to be measured, the second lens and the single-pixel detector in sequence; The single pixel detector is used to obtain a light intensity value according to the light beam; The processor is configured to obtain a reconstructed image according to the light intensity value.

4. A computer-readable storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to execute the image encoding method according to claim 1.

Citation Information

Patent Citations

  • Multi-image encryption and decryption method based on Walsh transform and ghost imaging calculation

    CN112989371A

  • SAR image recognition method and device and storage medium

    CN113688742A

  • Moving picture encoding and decoding device

    JP1994217280A

  • Apparatus and method for optically amplified imaging

    US20100141829A1

  • Three-dimensional computational imaging method and apparatus based on single-pixel sensor, and non-transitory computer-readable storage medium

    US20210021799A1