Image processing method and device, image detection method and system, and storage medium
By adding compensation data to image processing, the problem that convolutional neural networks are difficult to extract image edge features is solved, and compensation for edge pixels and information integrity are achieved.
Patent Information
- Application Number
- CN202011307773.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-19
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2040-11-19
AI Technical Summary
In the prior art, convolutional neural networks are difficult to extract image edge features when processing x-ray images, resulting in the loss of important information during information detection.
By acquiring the target image and the compensation signal, the pixel count value is calculated, and compensation data is added to the peripheral position of the edge pixel of the image to form the compensated target image, thereby extending the convolution operation to the edge pixel.
Compensation for pixels at the edge of the image is realized, allowing the convolution operation to be extended to the edge, maintaining the integrity of the image information and avoiding the loss of important information.
Smart Images

Figure CN114519690B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology. Specifically, the present application relates to an image processing method and device, an image detection method and system, and a storage medium. Background Art
[0002] When using convolutional neural networks to detect information in images, such as lesion detection in X-ray images, the edge features of the input image usually cannot be extracted because the pixels on the edge are not located at the center of the convolution kernel and the convolution kernel cannot extend beyond the edge area. This may result in the loss of some important information during information detection. Summary of the invention
[0003] In view of the shortcomings of the existing methods, the present application proposes an image processing method and device, an image detection method and system, and a storage medium to solve the technical problem that image edge features cannot be extracted in the prior art.
[0004] In a first aspect, an embodiment of the present application provides an image processing method, comprising:
[0005] Acquire the target image and compensation signal, and store the target image;
[0006] Count the pixels of the target image to obtain a count value;
[0007] According to the count value, compensation data corresponding to the compensation signal is added to the peripheral position of the edge pixel of the target image to obtain the pixel data of the compensated target image.
[0008] In a second aspect, an embodiment of the present application provides an image information detection method, including:
[0009] Acquire pixel data of a compensated target image output after being processed by the image processing method provided in the first aspect of the embodiment of the present application;
[0010] Performing feature extraction on pixel data of the compensated target image to obtain a feature image;
[0011] Determine target information based on feature images.
[0012] In a third aspect, an embodiment of the present application provides an image processing device, including: a compensation signal terminal, a counter, a data storage module and a data compensation module;
[0013] The compensation signal terminal, the counter and the data storage module are all communicatively connected with the data compensation module;
[0014] The counter is used to: count the pixels of the target image to obtain a count value;
[0015] The data storage module is used to: store the target image;
[0016] The data compensation module is used to add compensation data corresponding to the compensation signal of the compensation signal end at the peripheral position of the edge pixel of the target image according to the count value to obtain the pixel data of the compensated target image.
[0017] In a fourth aspect, an embodiment of the present application provides an image information detection system, comprising: an information detection device in communication connection and an image processing device provided by the third aspect of the embodiment of the present application;
[0018] The information detection device is used to execute and implement the image information detection method provided in the second aspect of the embodiment of the present application.
[0019] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements: the image processing method provided in the first aspect of the embodiment of the present application, or the image information detection method provided in the second aspect of the embodiment of the application.
[0020] The technical solution provided in the embodiments of the present application has at least the following beneficial effects:
[0021] The embodiment of the present application can traverse each pixel of the target image according to the count of the counter. By adding compensation data at the peripheral positions of the edge pixels of the target image, compensation for the traversed edge pixels can be achieved, so that subsequent convolution operations can be extended to the edge pixels, thereby making the input image and the output image consistent in size, so as to maintain the information integrity of the target image and avoid the loss of important information.
[0022] Additional aspects and advantages of the present application will be partially given in the following description, which will become apparent from the following description, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0024] Figure 1 A schematic diagram of the structural framework of an image processing device provided in an embodiment of the present application;
[0025] Figure 2 A schematic diagram of the structural framework of another image processing device provided in an embodiment of the present application;
[0026] Figure 3 A flowchart of an image processing method provided in an embodiment of the present application;
[0027] Figure 4A flowchart of another image processing method provided in an embodiment of the present application;
[0028] Figure 5 This is a schematic diagram of pixel data to be convolved within a 3*3 convolution kernel area in an embodiment of the present application;
[0029] Figure 6 In the embodiments of this application Figure 5 A schematic diagram of a compensation output waveform for compensating pixel data shown;
[0030] Figure 7 In the embodiments of this application Figure 5 A schematic diagram of pixel data to be convolved within a 3*3 convolution kernel area obtained after a compensation of the pixel data shown;
[0031] Figure 8 In the embodiments of this application Figure 5 A schematic diagram of another compensation output waveform for compensating pixel data shown;
[0032] Fig. 9 In the embodiments of this application Figure 5 A schematic diagram of pixel data to be convolved within a 3*3 convolution kernel area obtained after another compensation of the pixel data is performed;
[0033] Fig.10 A schematic diagram of a flow chart of an image information detection method provided in an embodiment of the present application;
[0034] Fig.11 Schematic diagram of the comparison of the target image before and after compensation in the embodiment of the present application. DETAILED DESCRIPTION
[0035] The present application is described in detail below, and examples of embodiments of the present application are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar components or components with the same or similar functions. In addition, if the detailed description of the known technology is unnecessary for the features of the present application shown, it will be omitted. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.
[0036] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0037] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0038] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments.
[0039] The present application embodiment provides an image processing device, such as Figure 1 As shown, the image processing device includes: a compensation signal terminal, a counter, a data storage module 110 and a data compensation module 120.
[0040] The compensation signal terminal, the counter and the data storage module 110 are all connected in communication with the data compensation module 120. The communication connection includes an electrical connection and an optical communication connection based on optical fiber, and the electrical connection includes a wired electrical connection and a wireless connection.
[0041] The counter is used to count the pixels of the target image to obtain the count value; the data storage module 110 is used to store the target image; the data compensation module 120 is used to add the compensation data corresponding to the compensation signal of the compensation signal end at the peripheral position of the edge pixel of the target image according to the count value to obtain the pixel data of the compensated target image.
[0042] The compensation data in the embodiment of the present application can be set according to actual needs, for example, can be set to 0.
[0043] Optionally, the counter includes: a column counter; the column counter is used to count the pixel columns of the target image to obtain a column count value (such as Figure 1 r_ctrl_rd_fifo0_cnt1 in ).
[0044] Alternatively, if Figure 1As shown, the data storage module 110 includes: a first memory RTL_ROM_1, a second memory RTL_ROM_2 and a third memory RTL_ROM_3; the first memory RTL_ROM_1, the second memory RTL_ROM_2 and the third memory RTL_ROM_3 are all electrically connected to the column counter.
[0045] The first memory RTL_ROM_1 is used to store the pixel data of the first row of pixels of the target image according to the column count value; the second memory RTL_ROM_2 is used to store the pixel data of the Nth row of pixels of the target image according to the column count value; the third memory RTL_ROM_3 is used to store the pixel data of the second row to the N-1th row of pixels of the target image according to the column count value; N is an integer greater than 1.
[0046] The first memory, the second memory and the third memory in the embodiment of the present application can all be ROM (Read-Only Memory) or other types of static storage devices that can store static information and instructions, can be RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, can also be EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read-Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disc, optical disk, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage medium or other magnetic storage device, or can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer. Any other medium, but not limited to this.
[0047] Alternatively, if Figure 1 As shown, the data compensation module 120 includes: a first data strobe RTL_MUX_1, a second data strobe RTL_MUX_2 and a third data strobe RTL_MUX_3.
[0048] A first data selector RTL_MUX_1, whose enable terminal, first input terminal and second input terminal are electrically connected to the column counter, the first memory RTL_ROM_1 and the compensation signal terminal respectively, and is used to add compensation data at the peripheral position of the first row of pixels stored in the first memory RTL_ROM_1 according to the column count value, and output the pixel data and compensation data of the first row of pixels;
[0049] A second data selector RTL_MUX_2, whose enable terminal, first input terminal and second input terminal are electrically connected to the column counter, the second memory RTL_ROM_2 and the compensation signal terminal respectively, and is used to add compensation data at the peripheral position of the Nth row of pixels stored in the second memory RTL_ROM_2 according to the column count value, and output the pixel data and compensation data of the Nth row of pixels;
[0050] The third data selector RTL_MUX_3, whose enable terminal, first input terminal and second input terminal are electrically connected to the column counter, the third memory RTL_ROM_3 and the compensation signal terminal respectively, is used to add compensation data at the peripheral positions of the first column pixels and the Mth column pixels stored in the third memory RTL_ROM_3 according to the column count value, and output pixel data of the second row pixels to the N-1th column pixels; M is an integer greater than 1.
[0051] Optionally, the counter further includes: a row counter; the row counter is used to count the pixel rows of the target image to obtain a row count value (such as Figure 1 r_rd_fm_row_cnt1 in );
[0052] Alternatively, if Figure 2 As shown, the image processing device provided in the embodiment of the present application further includes: a data output module 130.
[0053] The row counter, the first data strobe RTL_MUX_1, the second data strobe RTL_MUX_2 and the third data strobe RTL_MUX_3 are all electrically connected to the data output module 130;
[0054] The data output module 130 is used to output pixel data of the target image compensated by the first data strobe RTL_MUX_1 , the second data strobe RTL_MUX_2 , and the third data strobe RTL_MUX_3 according to the row count value.
[0055] Alternatively, if Figure 2 As shown, the data output module 130 includes: a fourth data strobe RTL_MUX_4 and a fifth data strobe RTL_MUX_5.
[0056] The fourth data selector RTL_MUX_4, its enable terminal, first input terminal and second input terminal are respectively electrically connected to the row counter, the output terminal of the second data selector RTL_MUX_2 and the output terminal of the third data selector RTL_MUX_3, and is used to output the pixel data output by the second data selector RTL_MUX_2 or the third data selector RTL_MUX_3 according to the row count value.
[0057] The fifth data selector RTL_MUX_5, whose enable terminal, first input terminal and second input terminal are respectively electrically connected to the row counter, the output terminal of the first data selector RTL_MUX_1 and the output terminal of the fourth data selector RTL_MUX_4, is used to output the pixel data output by the first data selector RTL_MUX_1 or the fourth data selector RTL_MUX_4 according to the row count value.
[0058] Optionally, the image processing device provided in the embodiment of the present application further includes: a register module RTL_REG. An input terminal D of the register module RTL_REG is electrically connected to an output terminal of the fifth data selector RTL_MUX_5. The register module RTL_REG is used to cache pixel data output by the fifth data selector RTL_MUX_5.
[0059] Optionally, the register module RTL_REG includes a plurality of triggers (eg, D triggers) connected in sequence; the register module RTL_REG can output cached pixel data and compensation data through the output terminal Q according to the needs of subsequent circuits or modules.
[0060] Reference Figure 2 , the clock terminal C of the register module RTL_REG is electrically connected to the system clock i_clk_100m, and the frequency of the system clock i_clk_100m can be 100 MHz (megahertz).
[0061] In the embodiment of the present application, N and M can be determined according to the specific target image. For example, for a 416*416 target image, N and M are both 416.
[0062] In an example, for a 416*416 target image, each pixel value is 16 bits (bits), the bit width of the row counter and the column counter can be 9 bits, and the counting range can be 0 to 415; the input and output of the first data selector RTL_MUX_1 and the second data selector RTL_MUX_2 are both 96 bits, and the output compensation is 144 bits, which is high bit compensation; the input and output of the third data selector RTL_MUX_3, the fourth data selector RTL_MUX_4 and the fifth data selector RTL_MUX_5 are all 144 bits.
[0063] Based on the same inventive concept, the embodiment of the present application provides an image processing method, which can be applied to an image processing device, such as Figure 3 As shown, the method includes:
[0064] S301, the data storage module 110 acquires and stores a target image.
[0065] The embodiments of the present application can be applied to a convolutional neural network, and the target image can be an original image to be input into the convolutional neural network, or a feature image that has undergone preliminary convolution.
[0066] Optionally, when storing the target image, pixel data of different rows are stored separately, pixel data of the first row of pixels are stored in the first memory RTL_ROM_1, pixel data of the Nth row of pixels are stored in the second memory RTL_ROM_2, and pixel data of the second to N-1th rows of pixels are stored in the third memory RTL_ROM_3.
[0067] S302: A counter counts pixels of a target image to obtain a count value.
[0068] Optionally, the counter counts pixels of the target image to obtain a count value, including: a column counter counts pixel columns of the target image to obtain a column count value.
[0069] Optionally, the counter counts pixels of the target image to obtain a count value, and further includes: a row counter counts pixel rows of the target image to obtain a row count value.
[0070] S303 , the data compensation module 120 adds compensation data corresponding to the compensation signal at the peripheral position of the edge pixel of the target image according to the count value to obtain compensated pixel data of the target image.
[0071] Optionally, the first data selector RTL_MUX_1 adds compensation data at the peripheral positions of the first row of pixels of the target image according to the column count value, and outputs the pixel data and compensation data of the first row of pixels. In this process, data pre-compensation of the first column pixel data (i.e., adding compensation data to the peripheral positions of the first column and the first row of pixels) can be achieved; the second data selector RTL_MUX_2 adds compensation data at the peripheral positions of the Nth row of pixels of the target image according to the column count value, and outputs the pixel data and compensation data of the Nth row of pixels. In this process, data pre-compensation of the first column data (i.e., adding compensation data to the peripheral positions of the first column and the Nth row of pixels) can be achieved; the third data selector RTL_MUX_3 adds compensation data at the peripheral positions of the first column pixels and the Mth column pixels of the target image according to the column count value, and outputs the pixel data of the second row of pixels to the N-1th column pixels; N and M are both integers greater than 1.
[0072] Alternatively, if Figure 4 As shown, the image processing method provided in the embodiment of the present application, based on the above steps S301 to S303, further includes the following steps:
[0073] S304 , the data output module 130 outputs the compensated pixel data of the target image according to the row count value.
[0074] Optionally, the fourth data strobe RTL_MUX_4 outputs the output value of the second data strobe RTL_MUX_2 or the third data strobe RTL_MUX_3 according to the row count value;
[0075] Optionally, when the row count value is the row number of pixels in the Nth row, the fourth data selector RTL_MUX_4 outputs the pixel data output by the second data selector RTL_MUX_2, that is, the pixel data and compensation data of the pixels in the Nth row; when the row count value is a row number other than the Nth row of pixels, the pixel data output by the third data selector RTL_MUX_3 is output, that is, the pixel data of the pixels in the second row to the N-1th column and the compensation data of the pixels in the first column and the pixels in the Mth column.
[0076] Optionally, the fifth data strobe RTL_MUX_5 outputs the output value of the first data strobe RTL_MUX_1 or the fourth data strobe RTL_MUX_4 according to the row count value.
[0077] Optionally, when the row count value is the row number of pixels in the 1st row, the fifth data selector RTL_MUX_5 outputs the pixel data output by the first data selector RTL_MUX_1, that is, the pixel data and compensation data of the pixels in the 1st row; when the row count value is the number of rows other than the pixels in the 1st row, the fifth data selector RTL_MUX_5 outputs the pixel data output by the fourth data selector RTL_MUX_4, that is, the pixel data of pixels in the 2nd row to the N-1th row and the compensation data of the pixels in the first column and the pixels in the Mth column.
[0078] In one example, taking a 416*416 target image as an example, when the row count value is 0, the fourth data selector RTL_MUX_4 outputs the pixel data of the pixels in the 2nd row to the 415th row and the compensation data of the pixels in the 1st column and the 416th column, and the fifth data selector RTL_MUX_5 outputs the pixel data and compensation data of the pixels in the 1st row; when the row count value is 415, the fourth data selector RTL_MUX_4 outputs the pixel data and compensation data of the pixels in the 416th row, and the fifth data selector RTL_MUX_5 outputs the pixel data and compensation data of the pixels in the 1st row. The fifth data selector RTL_MUX_5 also outputs the pixel data and compensation data of the 416th row of pixels; when the row count value is 1 to 144, the fourth data selector RTL_MUX_4 outputs the pixel data of the 2nd row of pixels to the 415th row of pixels and the compensation data of the 1st column of pixels and the 416th column of pixels, and the fifth data selector RTL_MUX_5 also outputs MUX-5 to output the pixel data of the 2nd row of pixels to the 415th row of pixels and the compensation data of the 1st column of pixels and the 416th column of pixels.
[0079] The compensation effect of the image processing device and the image processing method provided in the embodiment of the present application is introduced below with an example:
[0080] Assume that the pixel data to be convolved within a 3*3 convolution kernel area is as follows: Figure 5 As shown, the image processing device and image processing method provided by the embodiment of the present application are used to Figure 5 The pixel data shown is used for simulation experiments.
[0081] When both the row count value and the column count value are 0, Figure 5 The upper edge pixels and the left edge pixels are compensated, and the compensation output waveform is as follows Figure 6 As shown, i is the simulation time, and the pixel data after compensation when i=66 is as follows Figure 7 As shown; when the row count value and column count value are both 415, Figure 5 The bottom edge pixels and the right edge pixels are compensated, and the compensation output waveform is as follows Figure 8 As shown, i is the simulation time, and the pixel data after compensation when i=205 is as follows Fig. 9 shown.
[0082] Figure 6 , o_fm_win_dout corresponds to Figure 7 The output of all pixel data to be convolved by the 3*3 convolution kernel (corresponding to Figure 2 The output of the register module shown in FIG. 1 ), New Virtual Bus 11 corresponds to Figure 7 In the first line of output, NewVirtual Bus 10 corresponds to Figure 7 In the second line of the output, New Virtual Bus 9 corresponds to Figure 7 The third line of output.
[0083] Figure 8 In, o_fm_win_dout corresponds to Fig. 9 The output of all pixel data to be convolved by the 3*3 convolution kernel (corresponding to Figure 2 The output of the register module shown in FIG. 1 ), New Virtual Bus 11 corresponds to Fig. 9 In the first line of output, NewVirtual Bus 10 corresponds to Fig. 9 In the second line of the output, New Virtual Bus 9 corresponds to Fig. 9 The third line of output.
[0084] For a 3*3 convolution kernel, the image processing device provided by the embodiment of the present application can output corresponding cache data according to the convolution position of the convolution kernel in the subsequent convolution process. If the convolution position of the convolution kernel in the subsequent convolution process is in the non-edge pixel area of the original target image, 9 groups of pixel data of the original target image are output; if the convolution position of the convolution kernel in the subsequent convolution process is in the edge pixel area of the original target image, 9 groups of pixel data of the compensated target image are output; for convolution kernels of other sizes, the output method of the image processing device is similar.
[0085] By using the image processing device and method provided in the embodiments of the present application, at least the following beneficial effects can be achieved:
[0086] 1) The embodiment of the present application can traverse each pixel of the target image according to the count of the counter. By adding compensation data at the peripheral positions of the edge pixels of the target image, compensation for the traversed edge pixels can be achieved, so that subsequent convolution operations can be extended to the edge pixels, thereby making the input image and the output image the same size, so as to maintain the information integrity of the target image and avoid the loss of important information.
[0087] 2) The embodiments of the present application can store the pixel data of different pixel rows of the target image separately, and can implement separate processing based on the separately stored pixel data, that is, compensate the pixel data of edge pixel rows and edge pixel columns separately, and retain the original pixel data for non-edge areas, thereby simplifying the calculation to achieve targeted and fast edge compensation.
[0088] Based on the same inventive concept, an embodiment of the present application provides an image information detection system, including: a communication-connected information detection device and any one of the image processing devices provided in the embodiment of the present application.
[0089] The information detection device is used to execute and implement any one of the image information detection methods provided in the embodiments of the present application.
[0090] Based on the same inventive concept, the present application embodiment provides an image information detection method, such as Fig.10 As shown, the detection method includes:
[0091] S1001, obtaining pixel data of the compensated target image.
[0092] The pixel data of the compensated target image is the data obtained after processing by the image processing method provided in the embodiment of the present application, that is, the original pixel data and compensated data of the target image.
[0093] In one example, the compensated target image is as follows: Fig.11 As shown in the middle right picture, Fig.11 The original target image before compensation in the middle left image.
[0094] S1002, extracting features from pixel data of the compensated target image to obtain a feature image.
[0095] S1003, determining target information according to the feature image.
[0096] The image information detection system and method provided in the embodiments of the present application can be applied to the field of lesion detection based on X-ray images, such as lesion detection based on the target detection network yolov2-tiny. For X-ray images, after being processed by the image processing method provided in the embodiments of the present application, feature extraction can be performed on them to generate feature images, and then lesion information can be detected based on the feature images. Since edge pixels have been compensated in advance, the features of edge pixels can be extracted in this feature extraction process to avoid information omission.
[0097] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, any image processing method or any image information detection method provided in the embodiment of the present application is implemented.
[0098] The computer readable medium includes, but is not limited to, any type of disk (including floppy disk, hard disk, optical disk, CD-ROM, and magneto-optical disk), ROM, RAM, EPROM (Erasable Programmable Read-Only Memory), EEPROM, flash memory, magnetic card or optical card. In other words, the readable medium includes any medium that can store or transmit information in a readable form by a device (e.g., a computer).
[0099] The embodiment of the present application provides a computer-readable storage medium applicable to any of the above-mentioned image processing methods or any of the image information detection methods, which will not be described in detail here.
[0100] Those skilled in the art will appreciate that the various operations, methods, steps, measures, and schemes in the processes discussed in this application may be alternated, altered, combined, or deleted. Further, other steps, measures, and schemes in the various operations, methods, and processes discussed in this application may also be alternated, altered, rearranged, decomposed, combined, or deleted. Further, the steps, measures, and schemes in the prior art that are similar to those disclosed in this application may also be alternated, altered, rearranged, decomposed, combined, or deleted.
[0101] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the feature. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0102] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0103] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An image processing method, characterized in that: include: Get the target image and store it; Counting pixels of the target image to obtain a count value; According to the count value, adding compensation data corresponding to the compensation signal at the peripheral position of the edge pixel of the target image to obtain compensated pixel data of the target image; Counting pixels of the target image to obtain a count value includes: Counting pixel columns of the target image to obtain column count values; And, according to the count value, adding compensation data corresponding to the compensation signal at the peripheral position of the edge pixel of the target image, including: adding the compensation data at the peripheral position of the first row of pixels of the target image according to the column count value, and outputting the pixel data of the first row of pixels and the compensation data; adding the compensation data at the peripheral position of the pixels in the Nth row of the target image according to the column count value, and outputting the pixel data of the pixels in the Nth row and the compensation data; According to the column count value, the compensation data is added at the peripheral positions of the first column of pixels and the Mth column of pixels of the target image, and the pixel data of the second row of pixels to the N-1th column of pixels are output; Both N and M are integers greater than 1.
2. The image processing method according to claim 1, characterized in that: The step of counting pixels of the target image to obtain a count value further comprises: Counting pixel rows of the target image to obtain row count values; And, the image processing method further includes: Outputting the compensated pixel data of the target image according to the row count value.
3. An image information detection method, characterized in that: include: Acquire pixel data of a compensated target image output after being processed by the image processing method according to any one of claims 1 to 2; Performing feature extraction on the pixel data of the compensated target image to obtain a feature image; Target information is determined according to the feature image.
4. An image processing device, characterized in that: include: Compensation signal terminal, counter, data storage module and data compensation module; The compensation signal terminal, the counter and the data storage module are all in communication connection with the data compensation module; The counter is used to: count the pixels of the target image to obtain a count value; The data storage module is used to: store the target image; The data compensation module is used to: add compensation data corresponding to the compensation signal of the compensation signal end at the peripheral position of the edge pixel of the target image according to the count value, so as to obtain compensated pixel data of the target image; The counter comprises: a column counter; The column counter is used to count the pixel columns of the target image to obtain a column count value; And, the data storage module includes: a first memory, a second memory and a third memory; The first memory, the second memory and the third memory are all electrically connected to the column counter; The first memory is used to: store the pixel data of the first row of pixels of the target image according to the column count value; The second memory is used to: store the pixel data of the pixels of the Nth row of the target image according to the column count value; The third memory is used to: store the pixel data of the pixels of the second row to the N-1th row of the target image according to the column count value; N is an integer greater than 1.
5. The image processing device according to claim 4, characterized in that: The data compensation module comprises: a first data selector, whose enable terminal, first input terminal and second input terminal are electrically connected to the column counter, the first memory and the compensation signal terminal respectively, and is used to add the compensation data at the peripheral position of the first row of pixels stored in the first memory according to the column count value, and output the pixel data of the first row of pixels and the compensation data; a second data selector, whose enable terminal, first input terminal and second input terminal are electrically connected to the column counter, the second memory and the compensation signal terminal respectively, and is used to add the compensation data at the peripheral position of the Nth row of pixels stored in the second memory according to the column count value, and output the pixel data of the Nth row of pixels and the compensation data; A third data selector, whose enable terminal, first input terminal and second input terminal are electrically connected to the column counter, the third memory and the compensation signal terminal respectively, is used to add the compensation data at the peripheral positions of the first column pixels and the Mth column pixels stored in the third memory according to the column count value, and output the pixel data of the second row pixels to the N-1th column pixels; M is an integer greater than 1.
6. The image processing device according to claim 5, characterized in that: The counter further comprises: a row counter; The row counter is used to count the pixel rows of the target image to obtain a row count value; And, the image processing device further includes: a data output module; The row counter, the first data strobe, the second data strobe and the third data strobe are all electrically connected to the data output module; The data output module is used to output the pixel data of the target image compensated by the first data selector, the second data selector and the third data selector according to the row count value.
7. The image processing device according to claim 6, characterized in that: The data output module comprises: a fourth data strobe and a fifth data strobe; The fourth data strobe, whose enable terminal, first input terminal and second input terminal are electrically connected to the row counter, the output terminal of the second data strobe and the output terminal of the third data strobe respectively, is used to output the pixel data output by the second data strobe or the third data strobe according to the row count value; The fifth data selector, whose enable terminal, first input terminal and second input terminal are respectively electrically connected to the row counter, the output terminal of the first data selector and the output terminal of the fourth data selector, is used to output the pixel data output by the first data selector or the fourth data selector according to the row count value.
8. The image processing device according to claim 7, characterized in that: Also includes: Register module; The input end of the register module is electrically connected to the output end of the fifth data strobe; The register module is used to cache the pixel data output by the fifth data selector.
9. An image information detection system, characterized in that: include: An information detection device in communication connection and an image processing device as claimed in any one of claims 4 to 8; The information detection device is used to execute to implement the image information detection method as claimed in claim 3.
10. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the image processing method according to claims 1-2 or the image information detection method according to claim 3 is implemented.
Citation Information
Patent Citations
Display apparatus
CN106057115A
Video label determination method and device, server and storage medium
CN110765882A