Image correction method, image correction module, laser projection equipment and storage medium
By using DMA to read the lookup table data in the image correction module to determine the dispersion correction parameters, the problem of excessive CPU computing resources in the prior art is solved, and more efficient and real-time image correction is achieved.
Patent Information
- Application Number
- CN202210637258.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-07
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-06-07
AI Technical Summary
In the prior art, the image dedispersion method needs to occupy a large amount of CPU computing resources, increase CPU power consumption, and lead to poor real-time performance of image correction.
By using the direct storage access module DMA in the image correction module to read the lookup table data, the dispersion correction parameters are determined based on the lookup table data and image data, and these parameters are used to perform dispersion correction on the corrected pixel points, which reduces the CPU computing power occupation.
Reduces CPU power consumption, improves image correction efficiency and real-time performance.
Smart Images

Figure CN115017070B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an image correction method, an image correction module, a laser projection device and a storage medium. Background Art
[0002] As technology matures and costs fall, laser projection equipment has become a more competitive choice in the market. Compared with traditional LCD TVs, laser display has advantages such as eye protection and power saving. Laser projection equipment includes a laser source, an ultra-wide-angle lens, and an optical screen. Due to the physical properties of the lens and light, it is inevitable that the light signal will produce dispersion after being refracted by the lens.
[0003] In the related art, the CPU bandwidth is generally occupied to perform non-real-time correction on a single image through software algorithms. For example, the zoom factor of the shooting device when shooting the image to be processed is obtained, and the position information of the pixel points in the image to be processed is obtained; the color difference offset of the pixel point is determined according to the zoom factor and the position information; and the dispersion correction is performed on the pixel point according to the color difference offset.
[0004] The problem with the image de-dispersion method in the related art is that the software algorithm correction needs to occupy a large amount of CPU computing resources to match the high frame rate data of the TV image, which increases the power consumption of the CPU, and the large amount of software calculation makes the real-time performance of the image correction poor. Summary of the invention
[0005] The embodiments of the present invention provide an image correction method, an image correction module, a laser projection device and a storage medium, so as to solve the problem that the image de-dispersion method in the conventional technology needs to occupy a large amount of CPU computing resources, increase the power consumption of the CPU, and the large amount of software calculation makes the real-time performance of the image correction poor.
[0006] An embodiment of the present invention provides an image correction method, the method comprising:
[0007] For a pixel to be corrected in the image, obtaining image data of each row in the correction area image including the pixel to be corrected;
[0008] Reading the lookup table data through a direct memory access module DMA, and determining the dispersion correction parameter according to the lookup table data and each line of image data;
[0009] The dispersion correction parameters are used to perform dispersion correction on the pixel to be corrected.
[0010] Furthermore, the step of acquiring each row of image data in the correction area image including the pixel to be corrected comprises:
[0011] The image data in the input correction area image is obtained, and the image data is written into the static random read / write memory SRAM; and each row of image data in the correction area image is obtained through a read-back operation of the static random read / write memory SRAM.
[0012] Furthermore, the step of acquiring the input image data in the correction region image and writing the image data into the static random access memory (SRAM) comprises:
[0013] Acquire the input image data in the correction area image, and determine the current line buffer state indication information;
[0014] According to the simultaneous reading and writing rule, the image data in the static random read-write memory SRAM corresponding to the row cache state indication information is read, and the image data in the correction area image is written into the static random read-write memory SRAM.
[0015] Furthermore, the acquiring of each row of image data in the correction area image through the read-back operation of the static random read-write memory SRAM comprises:
[0016] The current row of image data in the correction area image obtained by the read-back operation and the row of image data above and below the current row of image data are remapped.
[0017] Further, determining the dispersion correction parameter according to the lookup table data and each row of image data includes:
[0018] Determining target position information of the pixel to be corrected;
[0019] Determine the target correction data corresponding to the target position information in the lookup data table according to the correspondence between the target position information and the pre-saved pixel position information and the correction data in the lookup data table;
[0020] A dispersion correction parameter is determined according to the target correction data and each line of image data.
[0021] Further, reading the lookup table data through the direct memory access module DMA includes:
[0022] The lookup table data in the device's independent memory or shared memory is read through the direct memory access module DMA.
[0023] Further, the adopting the dispersion correction parameter to perform dispersion correction on the pixel to be corrected includes:
[0024] The dispersion correction parameters are used to perform dispersion correction on the pixel values of each color channel of the pixel to be corrected.
[0025] On the other hand, an embodiment of the present invention provides an image correction module, the module comprising: a double rate synchronous dynamic random access memory DDR, a direct memory access module DMA, a line cache unit, an unpacking unit and a calculation unit; the calculation unit comprises an adaptive adjustment subunit and a correction subunit;
[0026] The DDR is used to store lookup table data;
[0027] The DMA is used to read the lookup table data stored in the DDR and send the read lookup table data to the depacketization unit for decompression and splitting processing;
[0028] The depacketizing unit is used to send the decompressed and split lookup table data to the adaptive adjustment subunit;
[0029] The row buffer unit is used to perform one-to-many processing on a row of input image data to obtain each row of image data in the correction area image, and send each row of image data to the adaptive adjustment subunit;
[0030] The adaptive adjustment subunit is used to determine the dispersion correction parameter according to the lookup table data after the decompression and splitting process and each line of image data, and send the dispersion correction parameter to the correction subunit;
[0031] The correction subunit is used to perform dispersion correction on the pixel to be corrected according to the dispersion correction parameter.
[0032] On the other hand, an embodiment of the present invention provides a laser projection device, including an image correction module, a laser source, an ultra-wide-angle lens, and an optical screen;
[0033] The image correction module is used to implement the method steps described in any one of claims 1 to 7, obtain a corrected image digital signal, and send the corrected image digital signal to the laser source;
[0034] The laser source is used to convert the corrected image digital signal and red, green and blue (RGB) pixel values sent by the image correction module into corresponding red, green and blue lasers; the lasers are projected to the corresponding positions of the optical screen for display through the ultra-wide-angle lens.
[0035] On the other hand, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of the above are implemented.
[0036] An embodiment of the present invention provides an image correction method, an image correction module, a laser projection device and a storage medium. The method includes: for a pixel to be corrected in an image, obtaining each row of image data in a correction area image including the pixel to be corrected; reading lookup table data through a direct memory access module DMA, and determining dispersion correction parameters according to the lookup table data and each row of image data; and performing dispersion correction on the pixel to be corrected using the dispersion correction parameters.
[0037] The above technical solution has the following advantages or beneficial effects:
[0038] In the embodiment of the present invention, the lookup table data is stored in the image correction module. When image correction is required, after obtaining each row of image data in the correction area image corresponding to the pixel to be corrected, the lookup table data is read through the direct storage access module DMA, and then the dispersion correction parameters are determined according to the lookup table data. Finally, the pixel to be corrected is subjected to dispersion correction according to the dispersion correction parameters. Reading the lookup table data through DMA does not require additional CPU computing power for algorithm processing. DMA reads the lookup table data in the form of a data stream to complete the image dispersion correction. The image correction scheme provided by the embodiment of the present invention greatly reduces the CPU power consumption, improves the efficiency of image correction, and makes the image correction more real-time. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 A schematic diagram of the structure of a laser projection device provided in an embodiment of the present invention;
[0041] Figure 2 A schematic diagram of image dispersion phenomenon provided by an embodiment of the present invention;
[0042] Figure 3 Schematic diagram of the image correction process provided for conventional techniques;
[0043] Figure 4 A schematic diagram of an image correction process provided by an embodiment of the present invention;
[0044] Figure 5 A schematic diagram of an image correction area provided by an embodiment of the present invention;
[0045] Figure 6 A schematic diagram of single pixel lookup table data provided by an embodiment of the present invention;
[0046] Figure 7 A schematic diagram showing a 4K resolution image search provided by an embodiment of the present invention;
[0047] Figure 8 A schematic diagram of a deployment of storing the lookup table data provided by an embodiment of the present invention in a 32-bit wide DDR;
[0048] Fig. 9 Four SRAM state transition diagrams provided for embodiments of the present invention;
[0049] Fig.10 Six SRAM state transition diagrams provided for embodiments of the present invention;
[0050] Fig.11 A schematic diagram of four SRAM remapping read-back operations provided by an embodiment of the present invention;
[0051] Fig.12 A schematic diagram of six SRAM remapping read-back operations provided by an embodiment of the present invention;
[0052] Fig.13 A block diagram of an image correction design provided by an embodiment of the present invention;
[0053] Fig.14 A block diagram of a computing module provided in an embodiment of the present invention;
[0054] Fig.15 A schematic diagram of double bandwidth read and write timing provided by an embodiment of the present invention;
[0055] Fig.16 A schematic diagram of the structure of an image correction module provided by an embodiment of the present invention;
[0056] Fig.17 A schematic diagram of the structure of a laser projection device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] Figure 1 This is a schematic diagram of the structure of a laser projection device provided in an embodiment of the present invention. The laser projection device includes a laser source, an ultra-wide-angle lens, and an optical screen. The laser source is responsible for converting the digital signal sent from the front end, the red, green, and blue (RGB) pixel value, into corresponding red, green, and blue lasers. The laser will then be projected to the corresponding position of the optical screen through an ultra-wide-angle lens for display.
[0059] Due to the physical properties of lenses and light, dispersion is inevitable after light signals are refracted through the lens. Figure 2 A schematic diagram of image dispersion phenomenon provided by an embodiment of the present invention. Figure 3 A schematic diagram of the image correction process provided for conventional technology includes the following steps:
[0060] S101: Obtaining the zoom factor of the photographing device when photographing the image to be processed, and obtaining the position information of the pixel points in the image to be processed.
[0061] S102: Determine the color difference offset of the pixel point according to the zoom factor and the position information.
[0062] S103: Performing dispersion correction on the pixel points according to the chromatic aberration offset.
[0063] Considering that in conventional technologies, when image dispersion correction is performed, the image processing is generally performed by software algorithms using the CPU power consumption, which increases the CPU power consumption and makes the image correction efficiency low and the real-time performance poor. The embodiment of the present invention provides an image correction solution that can greatly reduce the CPU power consumption and improve the image correction efficiency.
[0064] The image correction solution provided by the embodiment of the present invention is introduced in detail below.
[0065] Figure 4 A schematic diagram of an image correction process provided by an embodiment of the present invention, the process includes the following steps:
[0066] S201: For a pixel to be corrected in an image, obtain image data of each row in a correction area image including the pixel to be corrected.
[0067] S202: Reading the lookup table data through a direct memory access module DMA, and determining the dispersion correction parameter according to the lookup table data and each line of image data.
[0068] S203: Performing dispersion correction on the pixel to be corrected using the dispersion correction parameter.
[0069] The image correction method provided in the embodiment of the present invention is applied to an image correction module, which is integrated in a laser projection device. The image correction module processes the image digital signal and sends the processed image digital signal to a laser source. When the image correction module performs image correction, it performs correction on each pixel. The pixel to be corrected is referred to as a pixel to be corrected.
[0070] The image correction module determines a correction area image including the pixel to be corrected. The correction area image may be a 5×5 correction area image including the pixel to be corrected, or a 7×7 correction area image including the pixel to be corrected, etc. Preferably, Figure 5 A schematic diagram of an image correction region provided by an embodiment of the present invention, such as Figure 5 As shown, it can be a 5×5 correction area image including the pixel to be corrected and centered on the pixel to be corrected, it can be a 7×7 correction area image including the pixel to be corrected and centered on the pixel to be corrected, and so on. After determining the correction area image including the pixel to be corrected, obtain each line of image data in the correction area image. For example, the correction area image is a 5×5 correction area image including the pixel to be corrected and centered on the pixel to be corrected, and each line of image data in the correction area image is obtained as 5 lines of image data in the correction area image. For example, the correction area image is a 7×7 correction area image including the pixel to be corrected and centered on the pixel to be corrected, and each line of image data in the correction area image is obtained as 7 lines of image data in the correction area image.
[0071] The image correction module includes a direct storage access module DMA, and the lookup table data is read through the direct storage access module DMA, wherein the lookup table data corresponding to lenses with different parameters are different. When the lookup table data is read through DMA, the lens parameters of the captured image are first obtained, and then the storage address corresponding to the lookup table data corresponding to the lens of the captured image is determined, and the lookup table data is read through DMA according to the storage address corresponding to the lookup table data.
[0072] The lookup table data is the lookup table data for each pixel. Figure 6 A schematic diagram of single pixel lookup table data provided by an embodiment of the present invention, each pixel requires 12 bits of horizontal disparity information and 12 bits of vertical disparity information, that is, 24 bits of information lookup table information is required for each pixel in the image. Figure 6 As shown, the single pixel lookup table data is, for example, 0 to 5 bits storing green-blue vertical disparity information, 6 to 11 bits storing red-green vertical disparity information, 12 to 17 bits storing green-blue horizontal disparity information, and 18 to 23 bits storing red-green horizontal disparity information. The image lookup table data of the entire frame is compactly connected head to tail in the order of pixel position from left to right and from top to bottom. Figure 7 The 4K resolution 3840X2160 image search representation diagram provided in an embodiment of the present invention includes, from left to right, pixel point (0,0) correction data, pixel point (0,1) correction data, ..., pixel point (3839,2159) correction data.
[0073] The lookup table data is stored in the memory of the laser projection device, which may be stored in a double rate synchronous dynamic random access memory DDR. An independent DDR may be allocated to the lookup table data in the image correction module for storing the lookup table data. If bandwidth permits, the DDR may be shared with other data in the laser projection device, thereby reducing the device cost. Figure 8 A schematic diagram of the deployment of the lookup table data provided by the embodiment of the present invention stored in a 32-bit wide DDR, such as Figure 8 As shown, in the 0×00 row, the pixel (0, 0) occupies 0 to 23 bits, that is, pix0, 0 [23: 0]; the pixel (0, 1) occupies 16 to 23 bits, that is, pix0, 1 [23: 16]; in the 0×04 row, the pixel (0, 1) occupies 0 to 15 bits, that is, pix0, 1 [15: 0]; the pixel (0, 2) occupies 8 to 23 bits, that is, pix0, 2 [23: 8]; in the 0×08 row, the pixel (0, 2) occupies 0 to 7 bits, that is, pix0, 2 [7: 0]; pixel (0, 3) occupies 0 to 23 bits, i.e. pix0, 3 [23: 0]; in row 0×0C, pixel (0, 4) occupies 0 to 23 bits, i.e. pix0, 4 [23: 0]; pixel (0, 5) occupies 16 to 23 bits, i.e. pix0, 5 [23: 16]; in row 0×10, pixel (0, 5) occupies 0 to 15 bits, i.e. pix0, 5 [15: 0]; pixel (0, 6) occupies 8 to 23 bits, i.e. pix0, 6 [23: 8], and so on.
[0074] After acquiring each line of image data in the correction region image and reading the lookup table data, the dispersion correction parameter is determined according to the lookup table data and each line of image data.
[0075] It should be noted that, because the lookup table data is the lookup table data for each pixel, for each pixel, the data corresponding to the pixel in the lookup table data is called correction data. In order to improve the efficiency and accuracy of determining the dispersion correction parameter, the dispersion correction parameter is determined according to the lookup table data and each row of image data, including:
[0076] Determining target position information of the pixel to be corrected;
[0077] Determine the target correction data corresponding to the target position information in the lookup data table according to the correspondence between the target position information and the pre-saved pixel position information and the correction data in the lookup data table;
[0078] A dispersion correction parameter is determined according to the target correction data and each line of image data.
[0079] The image correction module can save the correspondence between each pixel and the correction data in the lookup data table in advance, so that when determining the dispersion correction parameters, the target position information of the pixel to be corrected in the image is first determined. According to the target position information and the pre-saved correspondence between each pixel and the correction data in the lookup data table, the target correction data corresponding to the target position information in the lookup data table can be determined. Read the target correction data, and determine the dispersion correction parameters according to the target correction data and each row of image data. Among them, the target correction data and each row of image data can be multiplied and added to obtain the dispersion correction parameters. Finally, the dispersion correction parameters are used to perform dispersion correction on the pixel to be corrected. Specifically, using the dispersion correction parameters to perform dispersion correction on the pixel to be corrected includes: using the dispersion correction parameters to perform dispersion correction on the pixel values of each color channel of the pixel to be corrected. Among them, conventional technology can be used to achieve dispersion correction of the pixel values of each color channel of the pixel to be corrected, and this process is not repeated in the embodiment of the present invention.
[0080] In an embodiment of the present invention, the image correction module includes a static random read-write memory SRAM, and obtaining each row of image data in the correction area image including the pixel to be corrected is achieved by reading back the static random read-write memory SRAM. The process of obtaining each row of image data in the correction area image is described in detail below.
[0081] Each row of image data in the correction area image including the pixel to be corrected is obtained. Specifically, the image data in the input correction area image is obtained, and the image data is written into a static random read-write memory SRAM; each row of image data in the correction area image is obtained through a read-back operation of the static random read-write memory SRAM.
[0082] In an embodiment of the present invention, in order to reduce the hardware cost of SRAM, a design of converting one row to N rows is implemented by implementing N-1 blocks of SRAM through the read-write simultaneous rule. Specifically, the image correction module includes multiple SRAMs, which obtain the image data in the input correction area image and determine the current row cache status indication information, and the row cache status indication information is used to indicate which SRAM the image data is written to. The row cache status indication information is determined by a finite state machine in the image correction module. In the initial state, the data in each SRAM is empty. At this time, it is determined to obtain the image data in the input correction area image, and after determining the current row cache status indication information, the image data is written to the SRAM indicated by the row cache status indication information. If there is image data in the SRAM indicated by the row cache status indication information, the image data in the SRAM corresponding to the row cache status indication information is read according to the read-write simultaneous rule, and the image data in the correction area image is written to the SRAM.
[0083] The embodiment of the present invention does not limit the number of SRAMs. If the device includes four SRAMs, the corrected region image is determined to be a 5×5 region image. If the device includes six SRAMs, the corrected region image is determined to be a 7×7 region image, etc. The following description is made by taking the device including four SRAMs as an example. Fig. 9 Four SRAM state transition diagrams provided for embodiments of the present invention are as follows: Fig. 9 As shown, the four SRAMs are SRAM0, SRAM1, SRAM2 and SRAM3. After obtaining the first row of image data in the input correction area image, it is determined that the current row cache status indication information is 0, then the first row of image data is written into SRAM0, and then the row cache status indication information is updated to 1. After obtaining the second row of image data in the input correction area image, it is determined that the current row cache status indication information is 1, then the second row of image data is written into SRAM1, and so on, the third row of image data is written into SRAM2, and the fourth row of image data is written into SRAM3. When writing the fifth row of image data, the row cache status indication information is updated to 0, at this time, the first row of image data in SRAM0 is read first, and then the fifth row of image data is written into SRAM0.
[0084] Fig.10 Six SRAM state transition diagrams provided for embodiments of the present invention are as follows: Fig.10 As shown, the six SRAMs are SRAM0, SRAM1, SRAM2, SRAM3, SRAM4 and SRAM5. After obtaining the first row of image data in the input correction area image, it is determined that the current row cache status indication information is 0, then the first row of image data is written into SRAM0, and then the row cache status indication information is updated to 1. After obtaining the second row of image data in the input correction area image, it is determined that the current row cache status indication information is 1, then the second row of image data is written into SRAM1, and so on, the third row of image data is written into SRAM2, the fourth row of image data is written into SRAM3, the fifth row of image data is written into SRAM4, and the sixth row of image data is written into SRAM5. When writing the seventh row of image data, the row cache status indication information is updated to 0, at this time, the first row of image data in SRAM0 is read first, and then the seventh row of image data is written into SRAM0. Through the read-back operation of each SRAM, each row of image data in the correction area image is obtained.
[0085] In order to facilitate the determination of dispersion correction parameters based on the lookup table data and each row of image data, each row of image data in the correction area image is obtained through the SRAM readback operation. Specifically, the current row of image data in the correction area image obtained by the readback operation and the image data of the upper and lower rows of the current row of image data are remapped.
[0086] The device includes four SRAMs as an example. The first row of image data is written into SRAM0, the second row of image data is written into SRAM1, and so on. The third row of image data is written into SRAM2, and the fourth row of image data is written into SRAM3. When writing the fifth row of image data, the row cache status indication information is updated to 0. At this time, the first row of image data in SRAM0 is read first, and then the fifth row of image data is written into SRAM0. Fig.11 As shown, the current row of image data in the correction area image obtained by remapping the read-back operation is the third row of image data, the finite state machine is implemented by a hardware circuit, and is used to indicate the image data write status, the second row of image data is -1 row of image data, the first row of image data is -2 row of image data, the fourth row of image data is +1 row of image data, and the fifth row of image data is +2 row of image data. After remapping, the current row of image data and the two rows of image data above and below, a total of five rows of image data, can be output in parallel, and the image data in the correction area image from one row to five rows can be obtained.
[0087] The device includes six SRAMs as an example. The first row of image data is written into SRAM0, the second row of image data is written into SRAM1, and so on. The third row of image data is written into SRAM2, the fourth row of image data is written into SRAM3, the fifth row of image data is written into SRAM4, and the sixth row of image data is written into SRAM5. When writing the seventh row of image data, the row cache status indication information is updated to 0. At this time, the first row of image data in SRAM0 is read first, and then the seventh row of image data is written into SRAM0. Fig.12 As shown, the current row of image data in the correction area image obtained by remapping the read-back operation is the fourth row of image data, the third row of image data is -1 row of image data, the second row of image data is -2 row of image data, the first row of image data is -3 row of image data, the fifth row of image data is +1 row of image data, the sixth row of image data is +2 row of image data, and the seventh row of image data is +3 row of image data. After remapping, the current row of image data and the three rows of image data above and below, a total of seven rows of image data, can be output in parallel, and the image data in the correction area image from one row to seven rows can be obtained.
[0088] Fig.13The image correction design block diagram provided for the embodiment of the present invention includes DDR, DMA, row cache unit, unpacking unit and computing unit. Lookup table data is stored in DDR, DMA reads the lookup table data stored in DDR, and sends the read lookup table data to the unpacking unit for decompression and splitting processing. A row of image data is input to the row cache unit, and the row cache unit performs one-to-many processing on the input row of image data to obtain each row of image data in the correction area image. The lookup table data after decompression and splitting processing and each row of image data in the correction area image are respectively sent to the computing unit, and the computing unit determines the dispersion correction parameters according to the lookup table data and each row of image data, and performs dispersion correction on the image according to the dispersion correction parameters.
[0089] Fig.14 A block diagram of a computing unit provided in an embodiment of the present invention, wherein the computing unit includes an adaptive adjustment subunit and a correction subunit; the decompressed and split lookup table data and each row of image data in the correction area image are respectively sent to the adaptive adjustment subunit, the adaptive adjustment subunit determines the dispersion correction parameters, the pixel values of the red, green and blue channels of the pixel to be corrected and the dispersion correction parameters are respectively input into the correction subunit, and the correction subunit performs dispersion correction on the pixel to be corrected according to the dispersion correction parameters.
[0090] The image correction method provided by the embodiment of the present invention processes digital color information in real time through a digital circuit, and automatically processes the projected image at the hardware level without the involvement of software, thereby reducing the overall system's demand for bus bandwidth. According to the optical characteristics of different lenses, it is only necessary to redeploy the corresponding lookup table data in the DDR to complete the adaptation. The image is pre-processed, and the dispersion correction parameters are adjusted in real time to achieve better image quality. By alternately multiplexing N blocks of SRAM, the cache utilization of N+1 rows of data is realized. For applications with a 4K resolution, the SRAM storage requirement of a whole row of 3840 pixels is saved. Better adaptability to the real-time image of the laser projection device brings better adaptation to the wide-angle lens and better imaging quality.
[0091] By doubling the bandwidth of SRAM and halving its depth, the function of simultaneous reading and writing of SRAM data is achieved. Reading is performed in even clock cycles and writing is performed in odd clock cycles. Fig.15A schematic diagram of the double bandwidth read and write timing provided for an embodiment of the present invention, wherein the pixel value of the dark portion is the data newly written into the SRAM, and after the original SRAM data is read out first, the same address will be replaced by the new data. In this operation sequence of read first and then write, the old data can be read out in advance and replaced with the new data. Because the read and write pixels are arranged in sequence, there is no need to consider random addressing, so the double bandwidth single-port SRAM (single-port SRAM) used for row cache application is equivalent to realizing the function of dual-port SRAM (dual-port SRAM). Under the same capacity, the hardware implementation area of dual-port SRAM is significantly larger than that of single-port SRAM. Compared with the traditional single-port SRAM for 1 row of data caching, the setting of the double bandwidth single-port SRAM can use N blocks to realize the cache of N+1 rows of data, saving the hardware cost of a whole row of SRAM.
[0092] It is common to use a single-port SRAM to cache N lines, which requires N blocks. If you switch to a dual-port SRAM that can read and write at the same time, it will take N-1 blocks to cache N lines. The hardware area of a dual-port SRAM of the same capacity is approximately twice that of a single-port SRAM. Because pixel cache applications are read and written sequentially, a single-port SRAM with double the bandwidth can be used to implement the function of a dual-port SRAM (sequential read and write only). Single-port SRAM: can only read or write 1 pixel per clock cycle, dual-port SRAM: can read 1 and write 1 pixel at the same time per clock cycle. Double-bandwidth SRAM: can only read or write 2 pixels per clock cycle. By alternating between reading and writing, the dual-port SRAM function of reading 1 and writing 1 is achieved on average.
[0093] Fig.16 A schematic diagram of the structure of an image correction module provided by an embodiment of the present invention includes: a double rate synchronous dynamic random access memory DDR161, a direct memory access module DMA162, a line cache unit 163, an unpacking unit 164 and a calculation unit 165; the calculation unit 165 includes an adaptive adjustment subunit 1651 and a correction subunit 1652;
[0094] The DDR161 is used to store the lookup table data;
[0095] The DMA 162 is used to read the lookup table data stored in the DDR 161, and send the read lookup table data to the depacketization unit 164 for decompression and splitting processing;
[0096] The depacketizing unit 164 is used to send the decompressed and split lookup table data to the adaptive adjustment subunit 1651;
[0097] The line buffer unit 163 is used to perform one-to-multiple processing on a line of input image data to obtain each line of image data in the correction area image, and send each line of image data to the adaptive adjustment subunit 1651;
[0098] The adaptive adjustment subunit 1651 is used to determine the dispersion correction parameter according to the lookup table data after the decompression and splitting process and each line of image data, and send the dispersion correction parameter to the correction subunit 1652;
[0099] The correction subunit 1652 is used to perform dispersion correction on the pixel to be corrected according to the dispersion correction parameters.
[0100] Fig.17 A schematic diagram of the structure of a laser projection device provided in an embodiment of the present invention includes: an image correction module 171, a laser source 172, an ultra-wide-angle lens 173 and an optical screen 174;
[0101] The image correction module 171 is used to perform image correction, obtain a corrected image digital signal, and send the corrected image digital signal to the laser source 172;
[0102] The laser source 172 is used to convert the corrected image digital signal and red, green and blue (RGB) pixel values sent by the image correction module 171 into corresponding red, green and blue lasers; the lasers are projected to the corresponding positions of the optical screen 174 through the ultra-wide-angle lens 173 for display.
[0103] like Fig.17 As shown, the laser projection device includes an image correction module 171, a laser source 172, an ultra-wide-angle lens 173 and an optical screen 174 connected in sequence. The image correction module 171 includes a double-rate synchronous dynamic random access memory DDR161, a direct memory access module DMA162, a line cache unit 163, an unpacking unit 164 and a calculation unit 165; the calculation unit 165 includes an adaptive adjustment subunit 1651 and a correction subunit 1652.
[0104] DDR161 is connected to DMA162, and DMA162 is also connected to unpacking unit 164; line cache unit 163 and unpacking unit 164 are also respectively connected to adaptive adjustment subunit 1651, and adaptive adjustment subunit 1651 is also connected to correction subunit 1652; correction subunit 1652 is connected to laser source 172.
[0105] The embodiment of the present invention further provides a computer storage readable storage medium, wherein the computer readable storage medium stores a computer program executable by the image correction module, and when the program is run on the image correction module, the image correction module implements the following steps when executed:
[0106] For a pixel to be corrected in the image, obtaining image data of each row in the correction area image including the pixel to be corrected;
[0107] Reading the lookup table data through a direct memory access module DMA, and determining the dispersion correction parameter according to the lookup table data and each line of image data;
[0108] The dispersion correction parameters are used to perform dispersion correction on the pixel to be corrected.
[0109] Based on the same inventive concept, a computer-readable storage medium is also provided in an embodiment of the present invention. Since the principle of solving the problem when the image correction module executes the computer program stored on the above-mentioned computer-readable storage medium is similar to that of the image correction method, the implementation of the image correction module when executing the computer program stored on the above-mentioned computer-readable storage medium can refer to the implementation of the method, and the repeated parts will not be repeated.
[0110] The above-mentioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the image correction module, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc., optical storage such as CDs, DVDs, BDs, HVDs, etc., and semiconductor storage such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drives (SSDs), etc.
[0111] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0112] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0113] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0114] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0115] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. An image correction method, characterized in that: Applied to an image correction module integrated in a laser projection device, the method comprises: For a pixel to be corrected in the image, obtaining image data of each row in the correction area image including the pixel to be corrected; Reading the lookup table data through a direct memory access module DMA, and determining the dispersion correction parameter according to the lookup table data and each row of image data; wherein a multiplication and accumulation operation is performed on the target correction data and each row of image data to obtain the dispersion correction parameter; Performing dispersion correction on the pixel to be corrected by using the dispersion correction parameter; The image correction module includes a plurality of SRAMs, and the design of converting one row to N rows is realized by implementing N-1 blocks of SRAM through the read-write simultaneous rule; the image data in the input correction area image is obtained, and the current row cache status indication information is determined; according to the read-write simultaneous rule, the image data in the static random read-write memory SRAM corresponding to the row cache status indication information is read, and the image data in the correction area image is written into the static random read-write memory SRAM; each row of image data in the correction area image is obtained through the read-back operation of the static random read-write memory SRAM; The design of implementing N-1 blocks of SRAM to complete the conversion of one row to N rows refers to using N-1 blocks of SRAM to obtain N rows of image data in the correction area image; After obtaining the first line of image data in the input correction area image, it is determined that the current line cache status indication information is 0, then the first line of image data is written into sram0 corresponding to the line cache status indication information of 0, and then the line cache status indication information is updated to 1; after obtaining the second line of image data in the input correction area image, it is determined that the current line cache status indication information is 1, then the second line of image data is written into sram1 corresponding to the line cache status indication information of 1, and so on. When writing the Nth line of image data, the line cache status indication information is updated to 0. At this time, the first line of image data in sram0 is read first, and then the Nth line of image data is written into sram0.
2. The method according to claim 1, characterized in that The acquiring of each row of image data in the correction area image by the read-back operation of the static random read-write memory SRAM comprises: The current row of image data in the correction area image obtained by the read-back operation and the row of image data above and below the current row of image data are remapped.
3. The method according to claim 1, characterized in that Determining the dispersion correction parameter according to the lookup table data and each row of image data comprises: Determining target position information of the pixel to be corrected; Determine the target correction data corresponding to the target position information in the lookup data table according to the correspondence between the target position information and the pre-saved pixel position information and the correction data in the lookup data table; A dispersion correction parameter is determined according to the target correction data and each line of image data.
4. The method according to claim 1, characterized in that The reading of the lookup table data through the direct memory access module DMA comprises: The lookup table data in the device's independent memory or shared memory is read through the direct memory access module DMA.
5. The method according to claim 1, characterized in that The adopting the dispersion correction parameter to perform dispersion correction on the pixel to be corrected comprises: The dispersion correction parameters are used to perform dispersion correction on the pixel values of each color channel of the pixel to be corrected.
6. An image correction module, characterized in that: The module includes: a double rate synchronous dynamic random access memory DDR, a direct memory access module DMA, a line cache unit, an unpacking unit and a calculation unit; the calculation unit includes an adaptive adjustment subunit and a correction subunit; The DDR is used to store lookup table data; The DMA is used to read the lookup table data stored in the DDR and send the read lookup table data to the depacketization unit for decompression and splitting processing; The depacketizing unit is used to send the decompressed and split lookup table data to the adaptive adjustment subunit; The row buffer unit is used to perform one-to-many processing on a row of input image data to obtain each row of image data in the correction area image, and send each row of image data to the adaptive adjustment subunit; The adaptive adjustment subunit is used to determine the dispersion correction parameter according to the lookup table data after the decompression and splitting process and each row of image data, and send the dispersion correction parameter to the correction subunit; wherein the dispersion correction parameter is obtained by performing multiplication and accumulation operations on the target correction data and each row of image data; The correction subunit is used to perform dispersion correction on the pixel to be corrected according to the dispersion correction parameter; The image correction module includes a plurality of SRAMs, and the design of converting one row to N rows is realized by implementing N-1 blocks of SRAM through the read-write simultaneous rule; the image data in the input correction area image is obtained, and the current row cache status indication information is determined; according to the read-write simultaneous rule, the image data in the static random read-write memory SRAM corresponding to the row cache status indication information is read, and the image data in the correction area image is written into the static random read-write memory SRAM; each row of image data in the correction area image is obtained through the read-back operation of the static random read-write memory SRAM; Performing one-to-multiple processing on a row of input image data to obtain each row of image data in the correction area image refers to a process of obtaining each row of image data in the correction area image based on the row where the pixel to be corrected is located in the image; wherein obtaining each row of image data in the correction area image includes: remapping the current row of image data in the correction area image obtained by the read-back operation and the image data of each row above and below the current row of image data; The design of implementing N-1 blocks of SRAM to complete the conversion of one row to N rows refers to using N-1 blocks of SRAM to obtain N rows of image data in the correction area image; After obtaining the first line of image data in the input correction area image, it is determined that the current line cache status indication information is 0, then the first line of image data is written into sram0 corresponding to the line cache status indication information of 0, and then the line cache status indication information is updated to 1; after obtaining the second line of image data in the input correction area image, it is determined that the current line cache status indication information is 1, then the second line of image data is written into sram1 corresponding to the line cache status indication information of 1, and so on. When writing the Nth line of image data, the line cache status indication information is updated to 0. At this time, the first line of image data in sram0 is read first, and then the Nth line of image data is written into sram0.
7. A laser projection device, characterized in that: Includes image correction module, laser source, ultra-wide-angle lens and optical screen; The image correction module is used to implement the method steps described in any one of claims 1 to 5, obtain a corrected image digital signal, and send the corrected image digital signal to the laser source; The laser source is used to convert the corrected image digital signal and red, green and blue (RGB) pixel values sent by the image correction module into corresponding red, green and blue lasers; the lasers are projected to the corresponding positions of the optical screen for display through the ultra-wide-angle lens.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 5 are implemented.
