Remote sensing image color uniformity method, system, device and medium based on histogram matching
Through the method based on histogram matching, the remote sensing image is uniformly processed, which solves the problems of cumbersome operations and large color difference in the prior art, and realizes convenient batch processing and efficient color difference reduction.
Patent Information
- Application Number
- CN202110997600.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-27
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2041-08-27
AI Technical Summary
The existing remote sensing image uniform color processing methods have disadvantages such as cumbersome operation, large color difference, and complex steps, and it is difficult to effectively avoid color difference in batch processing.
Using a histogram matching method, the pixel grayscale values of the image to be corrected and the base image are divided into preset bands, the median and upper limit values are calculated, linear stretching and segmentation are performed, and the medians are aligned one by one. , resegment and stretching to obtain the corrected pixel set.
It realizes easy to batch uniform color processing, effectively reduces color aberration, improves the visual effect of image stitching, and reduces operational complexity.
Smart Images

Figure CN113706426B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure specifically discloses a remote sensing image color uniformity method, system, device and medium based on histogram matching. Background Art
[0002] Remote sensing technology is a technology that detects and identifies targets by sensing electromagnetic waves, visible light, and infrared rays reflected or radiated by the target from a distance. Remote sensing images obtained based on remote sensing technology often need further processing to obtain a final image that is easy for the naked eye to identify and interpret. With the rapid development of computers and the continuous development of remote sensing technology, the use of computer algorithms to make corresponding processing flows to assist manual processing has begun to appear. This not only greatly reduces manpower and increases efficiency, but is also a major breakthrough in the field of remote sensing.
[0003] With the development of remote sensing, related remote sensing technologies are constantly emerging. Remote sensing technologies are widely used in military reconnaissance, earth resource exploration, environmental pollution detection, earthquake and volcanic eruption prediction, etc. Among them, the fields and usage of remote sensing image uniformity and splicing technology have also been expanding in recent years. For satellite images or drone images, they may be affected by weather, sensors, and human factors, so that the acquired remote sensing images have certain errors compared with the actual desired images. The emergence of these errors will cause the brightness and color of the acquired image data to be different, resulting in color difference and visual effects when the acquired images are spliced. Therefore, the image needs to be uniformly processed before splicing each acquired remote sensing image.
[0004] The existing color-leveling processing methods currently include the following: 1. Directly adjust the color manually through PS, which can be adjusted to the color closest to the base image directly through the human eye senses; 2. Linear stretching: for the grayscale mean and grayscale variance of the image, find the most suitable stretching range for the image; 3. Histogram matching method: based on the histogram of an image, the grayscale distribution of the original image is similar to the grayscale distribution of the reference image (that is, convert the histogram of an image to make it similar to the histogram of another image). From the algorithm design, it is to find a grayscale transformation function. Generally, a linear relationship between the mean and variance of the two images is established; 4. Wallis filter color-leveling method: It is a local image transformation that maps the mean and standard deviation of the image to be processed to the mean and standard deviation of the reference image.
[0005] However, the above color matching methods still have many disadvantages, such as: 1. Disadvantages of direct manual color adjustment through PS: Adjusting to the color closest to the base map through the human eye senses is not conducive to operation regardless of the amount of data, and it is time-consuming and labor-intensive. There are many factors that can affect the results. Different people may have different results when processing the same image. 2. Disadvantages of simple linear stretching: Sometimes even if the pixels are stretched to the specified range, there may still be large color differences. 3. Disadvantages of the histogram matching method: If the background range in the image is too large and no background removal is performed, the histogram matching will cause the distribution of gray levels in a certain range to be too concentrated. 4. Disadvantages of the Wallis filter color matching method: Very complicated steps are required to verify the reference image before color matching can be performed on the image to be corrected. Summary of the invention
[0006] In view of the above-mentioned defects or deficiencies in the prior art, the present application aims to provide a remote sensing image color uniformity method, system, device and medium based on histogram matching, which can facilitate batch color uniformity processing and effectively avoid large color differences compared to the prior art.
[0007] In the first aspect, a remote sensing image color uniformity method based on histogram matching includes the following steps: obtaining the pixel grayscale values of the image to be corrected and forming a first pixel set; dividing the grayscale values in the first pixel set into a preset number of first preset bands; counting the upper limit, median and lower limit of the grayscale value of each first preset band; obtaining the pixel grayscale values of the base map image and forming a third pixel set; dividing the grayscale values in the third pixel set into a preset number of second preset bands; counting the upper limit, median and lower limit of the grayscale value of each second preset band; aligning the median of the first preset band and the median of the second preset band one by one; dividing the first preset band one by one into: grayscale value range A first unit set between the lower limit and the median in this band and a second unit set with a grayscale value range between the median + 1 and the upper limit in this band; dividing the second preset band one by one into: a third unit set with a grayscale value range between the lower limit and the median in this band and a fourth unit set with a grayscale value range between the median + 1 and the upper limit in this band; stretching the first unit set to within the range of the third unit set corresponding to its median; stretching the second unit set to within the range of the fourth unit set corresponding to its median; summarizing the stretched first unit set and the second unit set one by one to obtain a modified first preset band, and then obtaining a first pixel set.
[0008] According to the technical solution provided in the embodiment of the present application, before calculating the upper limit, median and lower limit of the grayscale value of each first preset band, the following steps are also performed: traverse all the first preset bands in the first pixel set and correct the grayscale value in each first preset band one by one to obtain the second pixel set; and calculate the upper limit, median and lower limit of the grayscale value of each first preset band in the second pixel set.
[0009] According to the technical solution provided in the embodiment of the present application, the step of correcting the grayscale value in each first preset band one by one also includes: multiplying the grayscale value in each first preset band by 255 and then taking the square root, and rounding to obtain the corrected grayscale value; forming a second pixel set.
[0010] According to the technical solution provided in the embodiment of the present application, in the step of calculating the upper limit, median and lower limit of the grayscale value of each first preset band in the first pixel set, pixels with a grayscale value of 0 are excluded.
[0011] In a second aspect, a remote sensing image color uniformity system based on histogram matching includes: a first data acquisition module, used to acquire pixel grayscale values of an image to be corrected and form a first pixel set; divide the grayscale values in the first pixel set into a preset number of first preset bands; count the upper limit, median and lower limit of the grayscale value of each first preset band; a second data acquisition module, used to acquire pixel grayscale values of a base map image and form a third pixel set; divide the grayscale values in the third pixel set into a preset number of second preset bands; count the upper limit, median and lower limit of the grayscale value of each second preset band; an alignment module, used to align the median of the first preset band and the median of the second preset band one by one; a first segmentation module, used to segment the first preset band one by one as follows: A first unit set having a grayscale value range between a lower limit value and a median in the current band and a second unit set having a grayscale value range between a median + 1 and an upper limit value in the current band; a second segmentation module for segmenting the second preset band one by one into: a third unit set having a grayscale value range between a lower limit value and a median in the current band and a fourth unit set having a grayscale value range between a median + 1 and an upper limit value in the current band; a linear stretching module for stretching the first unit set to within the range of the third unit set corresponding to its median; stretching the second unit set to within the range of the fourth unit set corresponding to its median; an output module for summarizing the stretched first unit set and the second unit set one by one to obtain a corrected first pixel set and output a corrected image after uniform color.
[0012] According to the technical solution provided in the embodiment of the present application, the first data acquisition module also includes: a data correction module, which is used to traverse the first preset band in the first pixel set and correct the grayscale value in each first preset band one by one to obtain the second pixel set; and calculate the upper limit, median and lower limit of the grayscale value of each first preset band in the second pixel set.
[0013] In a third aspect, a computer device comprises: a memory for storing executable program code; and one or more processors for reading the executable program code stored in the memory to execute the remote sensing image color uniformity method based on histogram matching described in the first aspect.
[0014] In a fourth aspect, a computer-readable storage medium includes instructions, and when the instructions are executed on a computer, the computer executes the remote sensing image color uniformity method based on histogram matching as described in the first aspect.
[0015] Beneficial effects:
[0016] In summary, the present application discloses a remote sensing image color uniformity method based on histogram matching. The technical solution obtains a preset number of first preset bands corresponding to the image to be corrected and the same number of second preset bands corresponding to the base map image, respectively, calculates the median of the first preset band and the second preset band one by one, and aligns the median of the first preset band and the median of the second preset band one by one. Each first preset band is divided into a first unit set and a second unit set based on the median of each first preset band; and each second preset band is divided into a third unit set and a fourth unit set based on the median of the second preset band; the first unit set is stretched to the range of the third unit set corresponding to its median, and the second unit set is stretched to the range of the fourth unit set corresponding to its median. Based on the above design, when there is an offset in the histogram obtained from the first pixel set, the center of the data distribution can be better captured by aligning the median of the first preset band and the median of the second preset band one by one, and then the first preset band is re-segmented and linearly stretched based on the second preset band to obtain the corrected first pixel set, so that the final output is a corrected image with uniform color.
[0017] Furthermore, the technical solution also provides a technical solution for correcting the grayscale values in all the first preset bands in the first pixel set, that is, traversing all the first preset bands in the first pixel set and correcting the grayscale values in each first preset band one by one to obtain the second pixel set; and calculating the upper limit, median and lower limit of the grayscale value of each first preset band in the second pixel set. Based on this design, the grayscale values in the first pixel set to be corrected can be brightened as a whole, reducing the risk of overexposure, making the data more concentrated, and reducing the degree of offset. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0019] Figure 1 is a schematic diagram of the histogram of the image to be corrected;
[0020] Figure 2 It is a histogram diagram of the base map image;
[0021] Figure 3 It is a schematic diagram of the histogram of the corrected image after color uniformity;
[0022] Figure 4a is a schematic diagram of the image before processing;
[0023] Figure 4b is a schematic diagram of the processed image;
[0024] Figure 5 A schematic diagram of the computer equipment hardware structure is given. DETAILED DESCRIPTION
[0025] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.
[0026] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0027] A remote sensing image color uniformity method based on histogram matching comprises the following steps:
[0028] The pixel grayscale values of the image to be corrected are obtained and constitute a first pixel set; the grayscale values in the first pixel set are divided into a preset number of first preset bands. Specifically, for the image to be corrected, the grayscale values corresponding to each pixel point on it are extracted; the first pixel set is obtained, and the histogram corresponding to the first pixel set is as follows: Figure 1 shown. Figure 1 The histogram in the figure shown is clearly shifted to the left. In addition, Figure 1 The histogram in the first preset band is a preset number of first preset bands, that is, they are divided into R\G\B. The upper limit, median and lower limit of the grayscale value of each first preset band are counted. Optionally, in the step of calculating the upper limit, median and lower limit of the grayscale value of each first preset band in the first pixel set, pixels with a grayscale value of 0 are excluded to avoid the influence of the black background part on the image color correction result.
[0029] The pixel grayscale values of the base image are obtained and formed into a third pixel set; the grayscale values in the third pixel set are divided into a preset number of second preset bands. Specifically, for the base image, the grayscale values corresponding to each pixel point on it are extracted; the third pixel set is obtained, and the histogram corresponding to the third pixel set is as follows: Figure 2 shown. Figure 2 The histogram shown is a preset number of second preset bands, that is, they are divided into R\G\B. The upper limit, median and lower limit of the gray value of each second preset band are counted. Optionally, in the step of calculating the upper limit, median and lower limit of the gray value of each second preset band in the third pixel set, pixels with a gray value of 0 are excluded to avoid the influence of the black background part on the image color correction result.
[0030] Align the median of the first preset band and the median of the second preset band one by one, that is: Figure 1 The median of each first preset band (R\G\B) corresponds to Figure 2 The medians of the second preset bands (R\G\B) are aligned. Specifically, because the average value is easily affected by outliers (such as the average of the five numbers 4, 5, 5, 6, and 100 is 24, which is seriously deviated from the range of the data set by 100, but the median is 5, which is less affected by 100), when the histogram is offset, the median can better capture the center of the data distribution than the average value and reduce the offset of the histogram, that is, it can modify the shape of the histogram to make it closer to the effect of the base map.
[0031] The first preset band is divided into: a first unit set whose grayscale value range is between the lower limit and the median in the band and a second unit set whose grayscale value range is between the median + 1 and the upper limit in the band. The first preset band is composed of the first unit set and the second unit set.
[0032] The second preset band is divided one by one into: a third unit set whose grayscale value range is between the lower limit and the median in this band and a fourth unit set whose grayscale value range is between the median + 1 and the upper limit in this band; the second preset band is composed of the third unit set and the fourth unit set.
[0033] The first unit set is stretched to the range of the third unit set corresponding to the median thereof; the second unit set is stretched to the range of the fourth unit set corresponding to the median thereof; the stretched first unit set and the second unit set are summarized one by one to obtain the modified first preset band, and then the first pixel set is obtained. Please refer to Figure 3 As shown, (R\G\B) after correction by the above method.
[0034] Based on the above design, when there is an offset in the histogram obtained from the first pixel set, the center of the data distribution can be better captured by aligning the median of the first preset band and the median of the second preset band one by one, and then the first preset band is re-divided and linearly stretched based on the second preset band to obtain the corrected first preset band, and then the first pixel set is obtained, so that the final output is a corrected image with uniform color.
[0035] Please refer to Figure 4a The image before processing is shown in Figure 1, where area A shows the image to be corrected and area B shows the base image; please refer to Figure 4b The processed image shown in FIG. 1 is a corrected image after color uniformity, in which the A' region is a color uniformity corrected image. It can be seen from this that the above remote sensing image color uniformity method has an excellent effect and is suitable for promotion and use.
[0036] In a preferred embodiment, before calculating the upper limit, median and lower limit of the grayscale value of each first preset band, the following steps are further performed: traverse all first preset bands in the first pixel set and correct the grayscale value in each first preset band one by one to obtain the second pixel set; and calculate the upper limit, median and lower limit of the grayscale value of each first preset band in the second pixel set. Specifically, the step of correcting the grayscale value in each first preset band one by one also includes: multiplying the grayscale value in each first preset band by 255 and taking the square root, rounding to obtain the corrected grayscale value; forming the second pixel set.
[0037] In the specific correction process, in the above calculation process, on the one hand, the grayscale value of the pixel with a grayscale value of 0 remains unchanged; on the other hand, the pixels with smaller grayscale values will be brightened to a greater extent (such as the pixel with a grayscale value of 10 is brightened to 50, and the pixel with a grayscale value of 50 is brightened to 112). In addition, the grayscale value of the pixel with a larger grayscale value changes less, reducing the risk of overexposure (such as the pixel with a grayscale value of 200 is brightened to 225, and the pixel with a grayscale value of 250 is brightened to 252). Therefore, this processing will make the data relatively more concentrated and reduce the degree of rightward skew.
[0038] A remote sensing image color uniformity system based on histogram matching comprises: a first data acquisition module, used to acquire the pixel grayscale values of an image to be corrected and form a first pixel set; divide the grayscale values in the first pixel set into a preset number of first preset bands; count the upper limit value, median value and lower limit value of the grayscale value of each first preset band; a second data acquisition module, used to acquire the pixel grayscale values of a base map image and form a third pixel set; divide the grayscale values in the third pixel set into a preset number of second preset bands; count the upper limit value, median value and lower limit value of the grayscale value of each second preset band; an alignment module, used to align the median value of the first preset band with the median value of the second preset band one by one; a first segmentation module, used to segment the first preset band one by one into: grayscale values A first unit set having a range between a lower limit value and a median in the current band and a second unit set having a grayscale value range between the median + 1 and an upper limit value in the current band; a second segmentation module for segmenting the second preset band one by one into: a third unit set having a grayscale value range between a lower limit value and a median in the current band and a fourth unit set having a grayscale value range between the median + 1 and an upper limit value in the current band; a linear stretching module for stretching the first unit set to within the range of the third unit set corresponding to its median; stretching the second unit set to within the range of the fourth unit set corresponding to its median; an output module for summarizing the stretched first unit set and the second unit set one by one to obtain a corrected first pixel set and output a color-homed image to be corrected.
[0039] Based on the above method, using the first data acquisition module, the second data acquisition module, the alignment module, the first segmentation module, the second segmentation module, the linear stretching module and the output module, the above remote sensing image color uniformity method can be made into a portable device for convenient use.
[0040] In a preferred embodiment, the first data acquisition module also includes: a data correction module, which is used to traverse the first preset band in the first pixel set and correct the grayscale value in each first preset band one by one to obtain the second pixel set; and calculate the upper limit, median and lower limit of the grayscale value of each first preset band in the second pixel set.
[0041] In a preferred embodiment, the present application also provides a computer device, the device comprising: a memory for storing executable program code; one or more processors for reading the executable program code stored in the memory to execute the above-mentioned remote sensing image color uniformity method based on histogram matching. Figure 5 A schematic diagram of the computer equipment hardware structure is given.
[0042] The computer system includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage portion into a random access memory (RAM) 503. In the RAM 503, various programs and data required for system operation are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0043] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.
[0044] In particular, according to an embodiment of the present invention, the process described in the above remote sensing image color equalization method based on histogram matching can be implemented as a computer software program. For example, an embodiment of the present invention regarding the remote sensing image color equalization method based on histogram matching includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part, and / or installed from a removable medium. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present application are executed.
[0045] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0046] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of various remote sensing image color uniformity methods, devices and computer program products based on histogram matching according to the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0047] The units involved in the embodiments of the present invention may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, limit the units themselves. The units or modules described may also be set in a processor, for example, may be described as: a processor includes a first generation module, an acquisition module, a search module, a second generation module, and a merging module. The names of these units or modules do not, in some cases, limit the units or modules themselves.
[0048] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the remote sensing image color uniformity method based on histogram matching as described in the above embodiment.
[0049] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0050] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0051] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the present application.
Claims
1. A remote sensing image color uniformity method based on histogram matching, characterized in that: The steps include: Obtaining pixel grayscale values of the image to be corrected and forming a first pixel set; Divide the grayscale values in the first pixel set into a preset number of first preset bands; Counting the upper limit, median and lower limit of the grayscale value of each first preset band, including: calculating the upper limit, median and lower limit of the grayscale value of each first preset band in the first pixel set, and excluding pixels with a grayscale value of 0; Obtaining pixel grayscale values of the base map image and forming a third pixel set; Divide the grayscale values in the third pixel set into a preset number of second preset bands; Counting the upper limit, median and lower limit of the grayscale value of each second preset band, including: calculating the upper limit, median and lower limit of the grayscale value of each second preset band in the third pixel set, and excluding pixels with a grayscale value of 0; Aligning the median of the first preset band and the median of the second preset band one by one; The first preset band is divided one by one into: a first unit set with a gray value range between a lower limit value and a median value in the band and a second unit set with a gray value range between a median value + 1 and an upper limit value in the band; The second preset band is divided one by one into: a third unit set with a gray value range between a lower limit value and a median value in the band and a fourth unit set with a gray value range between a median value + 1 and an upper limit value in the band; stretching the first unit set to be within the range of the third unit set corresponding to its median; stretching the second unit set to be within the range of the fourth unit set corresponding to its median; The stretched first unit set and the second unit set are summarized one by one to obtain a corrected first preset band, and then to obtain a first pixel set.
2. The remote sensing image color uniformity method based on histogram matching according to claim 1, characterized in that: Before counting the upper limit, median and lower limit of the grayscale value of each first preset band, the following steps are performed: Traverse all first preset bands in the first pixel set and correct the grayscale value in each first preset band one by one to obtain a second pixel set; and calculate the upper limit, median and lower limit of the grayscale value of each first preset band in the second pixel set.
3. The remote sensing image color uniformity method based on histogram matching according to claim 2, characterized in that: The step of correcting the grayscale value in each first preset band one by one also includes: multiplying the grayscale value in each first preset band by 255, taking the square root, and rounding to obtain the corrected grayscale value; forming a second pixel set.
4. A remote sensing image color uniformity system based on histogram matching, characterized in that: include: A first data acquisition module, used to acquire the pixel grayscale values of the image to be corrected and form a first pixel set; Divide the grayscale values in the first pixel set into a preset number of first preset bands; Counting the upper limit, median and lower limit of the grayscale value of each first preset band, including: calculating the upper limit, median and lower limit of the grayscale value of each first preset band in the first pixel set, and excluding pixels with a grayscale value of 0; The second data acquisition module is used to acquire the pixel grayscale values of the base map image and form a third pixel set; divide the grayscale values in the third pixel set into a preset number of second preset bands; count the upper limit value, median value and lower limit value of the grayscale value of each second preset band, including: calculating the upper limit value, median value and lower limit value of the grayscale value of each second preset band in the third pixel set, and excluding pixels with a grayscale value of 0; An alignment module, used for aligning the median of the first preset band and the median of the second preset band one by one; A first segmentation module is used to segment the first preset band one by one into: a first unit set with a gray value range between a lower limit value and a median value in the band and a second unit set with a gray value range between a median value + 1 and an upper limit value in the band; The second segmentation module is used to segment the second preset band one by one into: a third unit set with a gray value range between a lower limit value and a median value in the band and a fourth unit set with a gray value range between a median value + 1 and an upper limit value in the band; A linear stretching module is used to stretch the first unit set to within the range of the third unit set corresponding to the median thereof; and to stretch the second unit set to within the range of the fourth unit set corresponding to the median thereof; The output module is used to collect the stretched first unit set and the second unit set one by one to obtain the corrected first pixel set and output a corrected image with uniform color.
5. The remote sensing image color uniformity method based on histogram matching according to claim 4, characterized in that: The first data acquisition module further includes: The data correction module is used to traverse the first preset band in the first pixel set and correct the grayscale value in each first preset band one by one to obtain the second pixel set; and calculate the upper limit, median and lower limit of the grayscale value of each first preset band in the second pixel set.
6. A computer device, characterized in that: The device comprises: a memory for storing executable program codes; and one or more processors for reading the executable program codes stored in the memory to execute the remote sensing image color uniformity method based on histogram matching described in any one of claims 1 to 3.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes instructions, and when the instructions are executed on a computer, the computer executes the remote sensing image color uniformity method based on histogram matching as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Segmentation method, device and terminal for epithelial cell nucleus in prostate cancer pathological image
CN111402267A
Weighted multispectral / hyperspectral remote sensing image color homogenizing method based on Wallis filtering and histogram matching
CN111652826A