CN117788336B - Data optimization acquisition method and system in homeland space planning process - Google Patents
Data optimization acquisition method and system in homeland space planning process Download PDFInfo
- Publication number
- CN117788336B CN117788336B CN202410216952.0A CN202410216952A CN117788336B CN 117788336 B CN117788336 B CN 117788336B CN 202410216952 A CN202410216952 A CN 202410216952A CN 117788336 B CN117788336 B CN 117788336B
- Authority
- CN
- China
- Prior art keywords
- fog
- suspected
- region
- value
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 69
- 230000008569 process Effects 0.000 title claims abstract description 32
- 238000005457 optimization Methods 0.000 title claims abstract description 14
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 36
- 238000002834 transmittance Methods 0.000 claims description 41
- 239000003595 mist Substances 0.000 claims description 12
- 239000002689 soil Substances 0.000 claims description 9
- 238000004364 calculation method Methods 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 6
- 230000006870 function Effects 0.000 claims description 5
- 230000003044 adaptive effect Effects 0.000 claims description 3
- 238000009826 distribution Methods 0.000 description 12
- 230000000694 effects Effects 0.000 description 9
- 230000006872 improvement Effects 0.000 description 3
- 230000000877 morphologic effect Effects 0.000 description 3
- 230000002238 attenuated effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 239000000779 smoke Substances 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Image Processing (AREA)
Abstract
The invention relates to the technical field of image data processing, in particular to a data optimization acquisition method and system in a homeland space planning process, wherein the method comprises the following steps: acquiring an original homeland space image to obtain a dark channel image; obtaining a suspected fog region by using a watershed algorithm on the dark channel image; obtaining the random degree of fog morphology according to the gray value of the pixel points of the suspected fog area; obtaining object color feature entropy under fog according to gray values of R, G, B channels of all pixel points of each suspected fog area; acquiring an object region according to an original homeland space image, and acquiring object region span entropy according to the number of pixels of the object region contained in the suspected fog region; acquiring fog possibility according to object color characteristic entropy under fog and object area span entropy; and finishing defogging treatment of the national and earth space image according to the fog possibility of each pixel point. Thereby realizing defogging optimization processing of the acquired homeland space image data.
Description
Technical Field
The invention relates to the technical field of image data processing, in particular to a data optimization acquisition method and system in a homeland space planning process.
Background
In the process of acquiring homeland resource data, a large number of environment shooting images need to be acquired. When an environment shooting image is acquired, as the homeland space planning data require shooting of a plurality of local remote sensing images, the shot image is often afflicted by environment smoke, so that the image quality is poor and the definition is low. Therefore, people often adopt an image defogging algorithm to process the shot homeland space planning image data.
The core of the image defogging algorithm commonly used at present is the image defogging algorithm based on a dark channel. However, when the algorithm processes a large number of white reflective areas such as sky, snow, lake surfaces and the like, the white reflective areas are mistakenly considered as foggy areas, the image quality is reduced due to the problems of overexposure, halation effect, color lump effect and the like, a good image defogging effect cannot be obtained, and the accuracy of data acquisition in the process of planning the planting land space is reduced.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a data optimization acquisition method and system in the planning process of the homeland space, and the adopted technical scheme is as follows:
In a first aspect, an embodiment of the present invention provides a method for data optimization and collection in a homeland space planning process, where the method includes the following steps:
acquiring an original homeland space image, and obtaining a dark channel image by adopting a dark channel algorithm on the original homeland space image;
Obtaining a dark channel cutting image by using a watershed algorithm on the dark channel image, and respectively marking all closed areas in the dark channel cutting image as suspected fog areas; obtaining gray outlier degree according to gray values of pixel points of each suspected fog area in the dark channel image; obtaining the random degree of fog morphology according to the gray level outlier degree of each suspected fog area; respectively obtaining object color feature entropy of suspected fog areas under R, G, B channels according to gray values of all pixel points of the suspected fog areas in the original national and soil space image in R, G, B channels; acquiring an object region according to an original homeland space image, and acquiring an object region span entropy of the suspected fog region according to the number of pixels of the object region contained in the suspected fog region; calculating the random degree of the object under fog according to the color characteristic entropy of the object under fog of the R, G, B channels in the suspected fog area and the span entropy of the object area; acquiring fog possibility according to the random degree of the object under fog of the suspected fog region and the gray value of the pixel point in the dark channel image and the gray value of the pixel point in the bright channel image respectively;
obtaining attenuation transmittance of each pixel point according to fog possibility of each pixel point in the initial homeland space image; and obtaining the self-adaptive transmittance of each pixel point according to the attenuation transmittance of each pixel point in the homeland space image, and finishing defogging treatment of the homeland space image.
Further, the obtaining the gray level outlier degree according to the gray level value of the pixel point of each suspected fog region in the dark channel image includes:
Taking all the same gray values in the dark channel cut image as the same kind; respectively marking each gray value as a gray value to be analyzed;
And for each suspected fog region, calculating the average value of gray values of all pixel points in the suspected fog region, acquiring the absolute value of the difference value between the gray value to be analyzed and the average value of the gray values, and taking the ratio of the absolute value of the difference value to the average value of the gray values as the gray outlier degree of the gray value to be analyzed in the suspected fog region.
Further, the obtaining the random degree of the fog morphology according to the gray level outlier degree of each suspected fog region includes:
obtaining the sum value of gray level outlier degrees of all kinds of gray values in a suspected fog region, calculating the information entropy of gray level values of all pixel points in the suspected fog region, and taking the product of the information entropy and the sum value as the fog form randomness degree of the suspected fog region.
Further, the obtaining object color feature entropy of the suspected fog region under the fog of R, G, B channels according to the gray values of R, G, B channels of all pixel points of each suspected fog region in the original homeland space image respectively includes:
Obtaining the maximum value of all gray values in the dark channel image, calculating the difference value between the maximum value and the gray value mean value, and recording the difference value as a first difference value; calculating the sum of the first difference value and 1, and recording the sum as a first sum; acquiring the ratio of the maximum value to the first sum value, and marking the ratio as a first ratio;
acquiring information entropy of gray values of all pixel points of each suspected fog region in an original homeland space image in an R channel, and marking the information entropy as a first information entropy; taking the product of the first ratio and the first information entropy as the color characteristic entropy of the object under the fog of the R channel in the suspected fog region;
and respectively adopting an acquisition method which is the same as that of the object color characteristic entropy of the suspected fog region under the fog of the R channel to obtain the object color characteristic entropy of the suspected fog region under the fog of the G, B channel for the gray values of all pixel points of each suspected fog region in the original national and earth space image at G, B channels.
Further, the obtaining the object region according to the original homeland space image, and obtaining the object region span entropy of the suspected fog region according to the number of pixels of the object region included in the suspected fog region, includes:
Converting an original national space image into a gray image, obtaining a national space cutting image by adopting a watershed algorithm on the gray image, and marking each closed region in the national space cutting image as an object region;
Respectively marking each suspected mist area as an area to be analyzed; counting the total number of pixel points contained in the area to be analyzed; the object area intersected with the area to be analyzed is marked as an intersected object of the area to be analyzed; acquiring the number of pixel points which are contained in the area to be analyzed and are positioned in the t-th intersecting object, and recording the number as the number of intersecting pixels of the area to be analyzed and the t-th intersecting object;
Calculating the ratio of the number of the intersected pixels to the total number of the pixel points, and obtaining a logarithmic function taking 2 as a base number and taking the ratio as a true number; obtaining the product of the calculation result of the logarithmic function and the ratio; and calculating the opposite number of the product, and taking the sum of the opposite numbers of the area to be analyzed and all the intersecting objects as the object area span entropy of the area to be analyzed.
Further, the calculating the randomness of the object under fog according to the color characteristic entropy of the object under fog of the R, G, B channels in the suspected fog area and the span entropy of the object area comprises the following steps:
and calculating the average value of the color characteristic entropy of the object under the fog of the R, G, B channels in the suspected fog region, and taking the sum value of the average value and the span entropy of the object region in the suspected fog region as the randomness degree of the object under the fog of the suspected fog region.
Further, the acquiring the fog possibility according to the gray value of the pixel point in the dark channel image and the bright channel image and the random degree of the object under fog and the random degree of the fog form of the suspected fog area respectively includes:
For each pixel point in the suspected fog region, calculating the gray value average value of all the pixel points in the eight neighborhood of the pixel point in the bright channel image; acquiring a gray value of a pixel point in a dark channel image, recording the gray value as a first gray value, and calculating a difference absolute value between the first gray value and a gray value mean value; acquiring a sum value of the random degree of an object under fog and the random degree of the fog form in a suspected fog area, and taking the product of the sum value and the absolute value of the difference value as the fog possibility of a pixel point;
the fog probability of all the pixels outside the suspected fog region is recorded as 0.
Further, the obtaining the attenuation transmittance of each pixel point according to the fog possibility of each pixel point in the initial homeland space image specifically includes:
Acquiring the transmittance of each pixel point obtained by adopting a dark channel algorithm on an original homeland space image, and marking the transmittance as a first transmittance; calculating the sum of the fog possibilities of all pixel points in the original homeland space image;
For each pixel point in the original homeland space image, calculating the ratio of the fog possibility of the pixel point to the sum value, and taking the product of the first transmittance of the pixel point and the ratio as the attenuation transmittance of the pixel point.
Further, the obtaining the adaptive transmittance of each pixel according to the attenuation transmittance of each pixel in the homeland space image, and completing defogging processing of the homeland space image, includes:
calculating the sum value of the first transmittance of all pixel points in the original homeland space image, and recording the sum value as a second sum value; calculating the sum value of attenuation transmittance of all pixel points in the original homeland space image, and marking the sum value as a third sum value; acquiring the ratio of the second sum value to the third sum value, and recording the ratio as a first ratio;
Taking the product of the attenuation transmittance of each pixel point in the homeland space image and the first ratio as the self-adaptive transmittance of the pixel point;
And using the self-adaptive transmittance of the pixel points to replace the transmittance of the corresponding pixel points in the dark channel algorithm, and carrying out defogging treatment on the national soil space image.
In a second aspect, an embodiment of the present invention further provides a data optimization acquisition system in a homeland space planning process, including a memory, a processor, and a computer program stored in the memory and running on the processor, where the processor implements the steps of any one of the methods described above when executing the computer program.
The invention has at least the following beneficial effects:
The invention provides a data optimization acquisition method and a system in a homeland space planning process, which are used for analyzing the problems that other highlight areas are easily mistaken as fog areas when defogging is carried out on homeland space image data by using a dark channel algorithm, so that phenomena such as overexposure and color lump effect are caused, and the problems are solved by improving the transmissivity; firstly, cutting an image into different suspected fog areas by adopting a watershed algorithm according to a dark channel image of an original national soil space image, calculating the fog form random degree according to gray value seeds in the suspected fog areas, and completing the resolution of fog and other highlight areas according to the fog form random degree, thereby being beneficial to further carrying out accurate defogging operation on the image; further analyzing the uneven thickness of fog in the fog coverage area, and according to the integral gray value of the suspected fog area in the dark channel image, combining the gray values of the object under fog in different color channels to obtain the color characteristic entropy of the object under fog, so as to be convenient for distinguishing whether the suspected fog area is covered by fog; the method comprises the steps of cutting an image into different object areas by using a watershed algorithm through a gray level national soil space image of an original national soil space image, obtaining object area span entropy by using the distribution confusion degree between a suspected fog area and the object areas, reflecting the diversity of objects under a fog coverage area, further obtaining the random degree of the object morphology under fog, and completing the resolution of fog and other highlight areas according to the morphological characteristics of the object under fog; and finally, acquiring the fog possibility of the pixel points of each pixel point in the image through the fog form random degree and the object form random degree under fog, and accordingly improving the transmittance to acquire the self-adaptive transmittance of each pixel point, avoiding the phenomena of overexposure, color lump effect and the like caused by carrying out the excessively strong defogging operation on the high-brightness pixel points, and improving the defogging precision of the dark channel algorithm on the national space image data.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of steps of a method for optimizing and collecting data in a homeland space planning process according to an embodiment of the present invention;
Fig. 2 is a schematic diagram of mist coverage.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following is a method and a system for optimally collecting data in the homeland space planning process according to the invention, which are provided by combining the accompanying drawings and the preferred embodiment, and the specific implementation, structure, characteristics and effects thereof are described in detail below. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The invention provides a specific scheme of a data optimization acquisition method and a system in a homeland space planning process, which are specifically described below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of steps of a data optimization acquisition method in a homeland space planning process according to an embodiment of the present invention is shown, and the method includes the following steps:
And S001, acquiring an original homeland space image.
Specifically, the embodiment aims to analyze the fog region and the non-fog region in the image through the dark channel characteristics in the image, so as to improve the transmissivity in the defogging algorithm to obtain a better defogging effect of the image. Firstly, in the planning process of the homeland space, a camera loaded by an unmanned aerial vehicle collects image data of a target area, wherein the color space is RGB color space, and is named as an original homeland space image.
Thus, the method according to the embodiment can acquire the original homeland space image.
Step S002, obtaining suspected fog areas according to the original homeland space images; obtaining object color feature entropy under fog according to gray values of R, G, B channels of all pixel points of each suspected fog area; acquiring an object region according to an original homeland space image, and acquiring an object region span entropy by combining the suspected mist region; and acquiring the possibility of fog according to the color characteristic entropy of the object under fog and the span entropy of the object area.
In this embodiment, the image defogging is completed by adopting a dark channel of the image, so that an original homeland space image is taken as an input, and a dark channel image is obtained by adopting an algorithm for calculating the dark channel. Since a typical non-white object always absorbs a part of the light when reflecting, this results in that the colored object always shows a lower light intensity value on a certain color channel, corresponding to a dark channel image, the gray value of the colored object area in the scene is in a lower color area, whereas in a dark channel image the area with a higher gray value is generally considered as the area where fog appears. The calculation of the dark channel is a well-known technique in the dark channel defogging algorithm, and will not be described in detail. Because in the traditional algorithm, the fog area is simply judged, the white, high-brightness and reflective areas are mistaken as the fog areas, and the phenomena of overexposure, color lump effect and the like can occur in the areas. Therefore, the embodiment further calculates the dark channel image and further divides the suspected fog region of the dark channel.
Firstly, a dark channel image is taken as input, a watershed algorithm is adopted for segmentation to obtain a dark channel cutting image, and the watershed algorithm is a well-known technology in the field and is not repeated. Each closed area in the dark channel cut image is noted as a suspected fog area. And counting the number of types of gray values in the dark channel cutting image, marking as the gray total amount, and calculating the random degree of the fog form for the m suspected fog area in the dark channel cutting image, wherein all the same gray values in the dark channel cutting image are used as the same type:
In the method, in the process of the invention, Is the gray level outlier degree of the nth gray value in the mth suspected fog region,/>Is the degree of randomness of the fog morphology of the mth suspected fog region,/>Is the gray level total of the dark channel cut image,/>For the nth gray value,/>Is the gray value average value of the mth suspected fog area in the dark channel image,/>Is the information entropy of the mth suspected fog region.
In the method, in the process of the invention,The information entropy of gray values in the mth suspected fog region is that the larger the information entropy is, the more disordered the gray value distribution of the dark channel in the mth region is represented, and the more random the characteristic distribution of the dark channel is; at this time,/>The larger the value is, the farther the gray value representing the nth gray value is from the gray value average value of the mth suspected fog region, the more disordered the gray value representing the dark channel of the mth suspected fog region is, and the more random the feature distribution of the dark channel of the mth suspected fog region is, so as to obtain the random degree of fog morphology, the larger the value is, the more random the feature distribution of the dark channel of the mth region is represented, the dark channel is represented by fog or the highlight white region in the original national space image, and the uneven thickness degree of the fog is, and the random feature distribution of the dark channel is obtained; for other areas of high brightness and whiteness, such as snow, sky, and reflective water, the distribution of dark channel features is uniform. Thus, the more random the mist pattern, the more likely the mth region is the mist region.
Because the area covered by the fog has obvious characteristics, the objects below the area have more effective information; for other high-brightness white areas, such as snow, sky and the like, which are not areas covered by fog, the texture information is less, and the effective information is less, so that the color feature entropy of the object under fog is calculated:
In the method, in the process of the invention, Is the object color characteristic entropy of the mth suspected fog region in the original national and earth space image under the fog of the R channel, and is/>Is the maximum of all gray values in the dark channel image,/>Is the gray value average value of the mth suspected fog area in the dark channel image,/>The information entropy of gray values of all pixel points of the mth suspected fog region in the original homeland space image in the R channel is obtained.
The larger the information entropy of the mth suspected fog region of the original homeland space image in each color channel is, the larger the information quantity of the image representing the region is, and the more likely the region is covered by fog; in the formula, the intensity degree of the color features of an object under fog is calculated by calculating the gray value distribution condition in an original homeland space image, and the gray value distribution of the area with larger influence of fog is larger as the influence degree of fog is different in different areas in the image, so that the pixel points with different gray values are more likely to be identical under the influence of the fog, and the difference between the gray value distributions is reduced, therefore, the difference between the gray value maximum value and the gray value average value of a dark channel of an upper gray value maximum value and an m suspected fog area is used as the integral deviation degree of the gray value for representing the pixel points, and the color feature entropy error of the object under fog caused by the gray value error is reduced. Finally, the color characteristic entropy of the object under fog is obtained, the larger the value of the color characteristic entropy is, the more obvious the color characteristic of the object under fog is, and the mth suspected fog area is more likely to be a fog covering area, but is not in other high-brightness white areas such as sky, snow and the like.
It should be noted that, the method for obtaining the color feature entropy of the m suspected fog area under the fog of the G channel and the color feature entropy of the m suspected fog area under the fog of the B channel in the original homemade space image is the same as the color feature entropy of the m suspected fog area under the fog of the R channel in the original homemade space image.
Further, because fog is randomly overlaid on other objects, the objects under fog are often complex and diverse, while for other white highlights, the objects themselves are refracted or reflected to form a color, and the objects under it are often complete. Therefore, in this embodiment, the original homeland space image is first converted into a gray image, a watershed algorithm is applied to the gray image to obtain a homeland space cutting image, and each closed area in the homeland space cutting image is recorded as an object area.
As shown in fig. 2, objects including reflective lakes are divided into different object regions due to the large difference in gray values, while fog is lighter and is covered over other objects, which are not divided into separate object regions.
According to the invention, fog or reflective lakes in the image are divided into different suspected fog areas through the dark channel image, and objects including reflective lakes in the original homeland space image are divided into different object areas. Because the mist distribution is random, a plurality of object areas exist in the dividing areas representing the mist distribution; whereas for other retroreflective regions there are only a small number of object regions in the partitioned area representing them, such as in the figure the partitioned area representing the lake, only the object region representing the lake itself. Therefore, in this embodiment, the object region intersecting with the mth suspected mist region is referred to as an intersecting object of the mth suspected mist region, and the object region span entropy is calculated from the positional relationship between the suspected mist region and the object region:
In the method, in the process of the invention, Is the object region span entropy of the mth suspected fog region, T is the number of intersecting objects with the mth suspected fog region,/>The number of the pixels of the mth suspected fog region, which is contained in the mth suspected fog region and is positioned at the t intersecting object, is recorded as the number of intersecting pixels of the mth suspected fog region and the t intersecting object,/>Is the total number of pixel points in the m suspected fog area; /(I)Is a logarithmic function with a base of 2.
When the mth suspected fog area is fog, the fog should span multiple object areas; when it is a fog region that is mistaken for other highlight white regions, the mth suspected fog region should have a small number of object regions; in the formula, the proportion of the pixel points occupied by the t object area in the m suspected fog area is taken as the occurrence probability of the t object area, the information entropy of the t object in the m suspected fog area is calculated, the sum of the information entropy of all the objects in the m suspected fog area is taken as the object area span entropy, and the more the value of the sum is greater, the more the object area spanned by the m suspected fog area is, the more the sum is likely to be the fog area.
Calculating the random degree of the object morphology under fog:
In the method, in the process of the invention, Is the random degree of the object under fog in the mth suspected fog area; /(I)、/>、/>Respectively obtaining color characteristic entropy of an object under fog of a R, G, B color channel in an mth suspected fog region in an original homeland space image; is the object area span entropy of the mth suspected fog area.
The original national space image is an RGB format picture, so that the color characteristic entropy of the object under fog of three color channels is averaged, the average value is used as the random degree of the object under fog on the color, and the larger the value is, the larger the random degree of the object under fog on the color is; the object area span entropy is the degree of randomness of the shape of the object under fog, and the larger the value is, the larger the degree of randomness of the shape of the object under fog is; the two are added to obtain the morphological randomness degree of the object under fog, the larger the value is, the larger the morphological randomness degree of the object under fog is, and the more complex the object in the mth area in the original national soil space image is, the more likely the object is a fog area.
Furthermore, in the traditional dark channel defogging algorithm, the perspective is calculated firstly, then the image is improved through the perspective, and each pixel point in the original homeland space image has corresponding transmissivity, so that the characteristic value of the fog area needs to be calculated to the pixel point level.
The original national soil space image is taken as input, a bright channel image is obtained by calculation through a bright channel algorithm, the bright channel algorithm is a known technology and is not described in detail, and for pixel points in a suspected fog region, the fog possibility of each pixel point is calculated:
In the method, in the process of the invention, Is the fog probability of the x-th pixel,/>Is the random degree of the object under fog of the suspected fog area where the xth pixel point is positioned,/>Is the random degree of fog form of the suspected fog region where the xth pixel point is located,/>Is the gray value of the x-th pixel point in the dark channel image,/>Is the gray value average value/>, of all pixel points in the 8 field of the x-th pixel point in the bright channel image。
Adding the random degree of the object under fog and the random degree of the fog form as the probability of fog in the region where the x-th pixel point is located, wherein the larger the value is, the more likely the region where the x-th pixel point is located is the fog region; since the fog region may still cover a part of other highlight regions, the highlight regions are not necessary for defogging calculation when defogging calculation is performed on the whole fog region, and the calculation may even cause overexposure phenomenon. Since the high brightness area mistakenly considered as fog is generally white as a whole, the difference between the gray value of the pixel point of the dark channel image and the gray value of the pixel point of the bright channel image is smaller, and the corresponding difference is larger for the normal object in the area covered by the fog, so that the smaller the difference between the gray value of the pixel point of the dark channel image and the gray value of the pixel point of the bright channel image is, the more likely the x-th pixel point is located in the fog area. In the formula, the special condition that the pixel point covered by fog appears white on a single pixel point may occur, and in order to prevent the pixel point from being mistakenly considered to be other highlight areas, the gray value average value in the neighborhood of the pixel point 8 of the bright channel image is used for replacing the gray value of the pixel point of the bright channel image to calculate.
And marking the fog possibility of all the pixels outside the suspected fog area as 0, so as to obtain the fog possibility of all the pixels in the original homeland space image.
Step S003, obtaining the self-adaptive transmissivity of each pixel point according to the fog possibility of each pixel point in the initial homeland space image, and finishing defogging treatment of the homeland space image.
The transmittance in the dark channel algorithm is calculated according to the fog probability of the pixel points, and the transmittance is improved:
In the method, in the process of the invention, Is the adaptive transmissivity of the x pixel after improvement,/>Is the attenuation transmissivity of the x-th pixel point,/>In order to obtain the transmissivity of the x-th pixel point by adopting a dark channel algorithm on the original homeland space image,Is the fog possibility of the xth pixel point, and X is the number of the pixel points in the original homeland space image.
In the formula, normalized weight is calculated according to the fog probability of the pixel points, the transmissivity adopted in an original dark channel defogging algorithm is improved, and the transmissivity attenuated by the fog probability of the pixel points is obtained, so that the original transmissivity of the pixel points which are unlikely to be fog is obtainedMultiplied by a smaller coefficient, and the defogging operation performed on it in the subsequent defogging algorithm is less aggressive. Further due to the transmittance/>, after being attenuated by the pixel mist probabilityOverall greater than original transmittance/>Becomes smaller, so that the two are respectively summed and compared as coefficient pair/>And (3) performing linear transformation to ensure that defogging force of the improved transmissivity on the original homeland space image is unchanged. The higher the value of the transmittance after improvement, which represents the serious coverage of the x-th pixel point by fog, the more powerful defogging operation is required.
And finally, replacing the transmissivity in the dark channel algorithm by the self-adaptive transmissivity, and completing defogging of the national and earth space image data by using the dark channel algorithm. The dark channel algorithm is a well known technique in the art and will not be described in detail.
Based on the same inventive concept as the above method, the embodiment of the invention also provides a data optimization acquisition system in the homeland space planning process, which comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor realizes the steps of any one of the data optimization acquisition methods in the homeland space planning process when executing the computer program.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. And the foregoing description has been directed to specific embodiments of this specification. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
The foregoing description of the preferred embodiments of the present invention is not intended to be limiting, but rather, any modifications, equivalents, improvements, etc. that fall within the principles of the present invention are intended to be included within the scope of the present invention.
Claims (5)
1. The data optimization acquisition method in the homeland space planning process is characterized by comprising the following steps of:
acquiring an original homeland space image, and obtaining a dark channel image by adopting a dark channel algorithm on the original homeland space image;
Obtaining a dark channel cutting image by using a watershed algorithm on the dark channel image, and respectively marking all closed areas in the dark channel cutting image as suspected fog areas; obtaining gray outlier degree according to gray values of pixel points of each suspected fog area in the dark channel image; obtaining the random degree of fog morphology according to the gray level outlier degree of each suspected fog area; respectively obtaining object color feature entropy of suspected fog areas under R, G, B channels according to gray values of all pixel points of the suspected fog areas in the original national and soil space image in R, G, B channels; acquiring an object region according to an original homeland space image, and acquiring an object region span entropy of the suspected fog region according to the number of pixels of the object region contained in the suspected fog region; calculating the random degree of the object under fog according to the color characteristic entropy of the object under fog of the R, G, B channels in the suspected fog area and the span entropy of the object area; acquiring fog possibility according to the random degree of the object under fog of the suspected fog region and the gray value of the pixel point in the dark channel image and the gray value of the pixel point in the bright channel image respectively;
Obtaining attenuation transmittance of each pixel point according to fog possibility of each pixel point in the initial homeland space image; obtaining self-adaptive transmittance of each pixel point according to attenuation transmittance of each pixel point in the homeland space image, and finishing defogging treatment of the homeland space image;
the obtaining the gray level outlier degree according to the gray level value of the pixel point of each suspected fog area in the dark channel image comprises the following steps:
Taking all the same gray values in the dark channel cut image as the same kind; respectively marking each gray value as a gray value to be analyzed;
For each suspected fog region, calculating the average value of gray values of all pixel points in the suspected fog region, obtaining the absolute value of the difference value between the gray value to be analyzed and the average value of the gray values, and taking the ratio of the absolute value of the difference value to the average value of the gray values as the gray outlier degree of the gray value to be analyzed in the suspected fog region;
The step of obtaining the random degree of the fog morphology according to the gray level outlier degree of each suspected fog area comprises the following steps:
obtaining the sum value of gray level outlier degrees of all kinds of gray values in a suspected fog region, calculating the information entropy of gray level values of all pixel points in the suspected fog region, and taking the product of the information entropy and the sum value as the fog form randomness degree of the suspected fog region;
the method for respectively obtaining the color feature entropy of the object under the fog of the suspected fog region in the R, G, B channel according to the gray values of all pixel points of the suspected fog region in the original national and earth space image in the R, G, B channel comprises the following steps:
Obtaining the maximum value of all gray values in the dark channel image, calculating the difference value between the maximum value and the gray value mean value, and recording the difference value as a first difference value; calculating the sum of the first difference value and 1, and recording the sum as a first sum; acquiring the ratio of the maximum value to the first sum value, and marking the ratio as a first ratio;
acquiring information entropy of gray values of all pixel points of each suspected fog region in an original homeland space image in an R channel, and marking the information entropy as a first information entropy; taking the product of the first ratio and the first information entropy as the color characteristic entropy of the object under the fog of the R channel in the suspected fog region;
Respectively obtaining color characteristic entropy of the object under fog of the suspected fog region in G, B channels by adopting an acquisition method which is the same as that of the object under fog of the suspected fog region in R channels for gray values of all pixel points of the suspected fog region in G, B channels in an original national and earth space image;
The obtaining the object region according to the original national and earth space image, and obtaining the object region span entropy of the suspected fog region according to the pixel point number of the object region contained in the suspected fog region, comprises the following steps:
Converting an original national space image into a gray image, obtaining a national space cutting image by adopting a watershed algorithm on the gray image, and marking each closed region in the national space cutting image as an object region;
Respectively marking each suspected mist area as an area to be analyzed; counting the total number of pixel points contained in the area to be analyzed; the object area intersected with the area to be analyzed is marked as an intersected object of the area to be analyzed; acquiring the number of pixel points which are contained in the area to be analyzed and are positioned in the t-th intersecting object, and recording the number as the number of intersecting pixels of the area to be analyzed and the t-th intersecting object;
Calculating the ratio of the number of the intersected pixels to the total number of the pixel points, and obtaining a logarithmic function taking 2 as a base number and taking the ratio as a true number; obtaining the product of the calculation result of the logarithmic function and the ratio; calculating the opposite number of the product, and taking the sum of the opposite numbers of the area to be analyzed and all the intersecting objects as the object area span entropy of the area to be analyzed;
The acquiring the fog possibility according to the gray value of the pixel point in the dark channel image and the bright channel image and the random degree of the object under fog of the suspected fog area, comprises the following steps:
For each pixel point in the suspected fog region, calculating the gray value average value of all the pixel points in the eight neighborhood of the pixel point in the bright channel image and marking the gray value average value as a first average value; acquiring gray values of pixel points in a dark channel image, marking the gray values as first gray values, calculating the absolute value of the difference between the first gray values and the first average value, and marking the absolute value of the difference as a first absolute value; acquiring a sum value of the random degree of an object under fog and the random degree of the fog form of a suspected fog region, marking the sum value as a first sum value, and taking the product of the first sum value and the first absolute value as the fog possibility of a pixel point;
the fog probability of all the pixels outside the suspected fog region is recorded as 0.
2. The method for optimizing and collecting data in a planning process of a homeland space according to claim 1, wherein the calculating the randomness of the object under fog according to the color characteristic entropy of the object under fog of the R, G, B channels in the suspected fog area and the span entropy of the object area comprises the following steps:
and calculating the average value of the color characteristic entropy of the object under the fog of the R, G, B channels in the suspected fog region, and taking the sum value of the average value and the span entropy of the object region in the suspected fog region as the randomness degree of the object under the fog of the suspected fog region.
3. The method for optimizing and collecting data in a homeland space planning process according to claim 1, wherein the obtaining the attenuation transmittance of each pixel point according to the fog possibility of each pixel point in the homeland space image specifically comprises:
Acquiring the transmittance of each pixel point obtained by adopting a dark channel algorithm on an original homeland space image, and marking the transmittance as a first transmittance; calculating the sum of the fog possibilities of all pixel points in the original homeland space image;
For each pixel point in the original homeland space image, calculating the ratio of the fog possibility of the pixel point to the sum value, and taking the product of the first transmittance of the pixel point and the ratio as the attenuation transmittance of the pixel point.
4. The method for optimizing and collecting data in a homeland space planning process according to claim 3, wherein the step of obtaining the adaptive transmittance of each pixel point according to the attenuation transmittance of each pixel point in the homeland space image to complete defogging treatment of the homeland space image comprises the following steps:
calculating the sum value of the first transmittance of all pixel points in the original homeland space image, and recording the sum value as a second sum value; calculating the sum value of attenuation transmittance of all pixel points in the original homeland space image, and marking the sum value as a third sum value; acquiring the ratio of the second sum value to the third sum value, and recording the ratio as a first ratio;
Taking the product of the attenuation transmittance of each pixel point in the homeland space image and the first ratio as the self-adaptive transmittance of the pixel point;
And using the self-adaptive transmittance of the pixel points to replace the transmittance of the corresponding pixel points in the dark channel algorithm, and carrying out defogging treatment on the national soil space image.
5. A data optimized acquisition system in a homeland space planning process, comprising a memory, a processor and a computer program stored in the memory and running on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1-4 when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410216952.0A CN117788336B (en) | 2024-02-28 | 2024-02-28 | Data optimization acquisition method and system in homeland space planning process |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410216952.0A CN117788336B (en) | 2024-02-28 | 2024-02-28 | Data optimization acquisition method and system in homeland space planning process |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117788336A CN117788336A (en) | 2024-03-29 |
CN117788336B true CN117788336B (en) | 2024-05-24 |
Family
ID=90380189
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410216952.0A Active CN117788336B (en) | 2024-02-28 | 2024-02-28 | Data optimization acquisition method and system in homeland space planning process |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117788336B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108765336A (en) * | 2018-05-25 | 2018-11-06 | 长安大学 | Image defogging method based on dark bright primary colors priori with auto-adaptive parameter optimization |
CN108876743A (en) * | 2018-06-26 | 2018-11-23 | 中山大学 | A kind of image rapid defogging method, system, terminal and storage medium |
WO2020232710A1 (en) * | 2019-05-23 | 2020-11-26 | 深圳大学 | Haze image quality evaluation method and system, storage medium, and electronic device |
WO2021000302A1 (en) * | 2019-07-03 | 2021-01-07 | 深圳大学 | Image dehazing method and system based on superpixel segmentation, and storage medium and electronic device |
WO2021082735A1 (en) * | 2019-10-31 | 2021-05-06 | 华为技术有限公司 | Fog feature recognition method, apparatus, and related device |
CN114005090A (en) * | 2021-11-12 | 2022-02-01 | 中山大学 | Suspected smoke proposed area and deep learning-based smoke detection method |
CN114677289A (en) * | 2021-09-24 | 2022-06-28 | 西安电子科技大学 | Image defogging method and system, computer equipment, storage medium and terminal |
CN116797484A (en) * | 2023-06-29 | 2023-09-22 | 西安电子科技大学广州研究院 | Image defogging method and system based on improved dark channel prior |
CN117078049A (en) * | 2023-10-18 | 2023-11-17 | 山东昆仲信息科技有限公司 | Homeland space planning evaluation method and system |
-
2024
- 2024-02-28 CN CN202410216952.0A patent/CN117788336B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108765336A (en) * | 2018-05-25 | 2018-11-06 | 长安大学 | Image defogging method based on dark bright primary colors priori with auto-adaptive parameter optimization |
CN108876743A (en) * | 2018-06-26 | 2018-11-23 | 中山大学 | A kind of image rapid defogging method, system, terminal and storage medium |
WO2020232710A1 (en) * | 2019-05-23 | 2020-11-26 | 深圳大学 | Haze image quality evaluation method and system, storage medium, and electronic device |
WO2021000302A1 (en) * | 2019-07-03 | 2021-01-07 | 深圳大学 | Image dehazing method and system based on superpixel segmentation, and storage medium and electronic device |
WO2021082735A1 (en) * | 2019-10-31 | 2021-05-06 | 华为技术有限公司 | Fog feature recognition method, apparatus, and related device |
CN114677289A (en) * | 2021-09-24 | 2022-06-28 | 西安电子科技大学 | Image defogging method and system, computer equipment, storage medium and terminal |
CN114005090A (en) * | 2021-11-12 | 2022-02-01 | 中山大学 | Suspected smoke proposed area and deep learning-based smoke detection method |
CN116797484A (en) * | 2023-06-29 | 2023-09-22 | 西安电子科技大学广州研究院 | Image defogging method and system based on improved dark channel prior |
CN117152016A (en) * | 2023-06-29 | 2023-12-01 | 西安电子科技大学广州研究院 | Image defogging method and system based on improved dark channel prior |
CN117078049A (en) * | 2023-10-18 | 2023-11-17 | 山东昆仲信息科技有限公司 | Homeland space planning evaluation method and system |
Non-Patent Citations (4)
Title |
---|
Single Image Haze Removal Using Dark Channel Prior;Kaiming He et al.;《2009 IEEE Conference on Computer Vision and Pattern Recognition》;20090818;第1956-1963页 * |
一种改进的基于暗通道先验的图像去雾算法;杨旭等;《沈阳理工大学学报》;20191215;第38卷(第06期);第15-21页 * |
基于混合暗通道算法的图像去雾研究;邵明省;《计量学报》;20200728;第41卷(第07期);第796-800页 * |
融合光场EPI深度估计与大气散射模型的图像去雾方法;褚擎天;《中国优秀硕士学位论文全文数据库信息科技辑》;20210215(第02期);第I138-1629页 * |
Also Published As
Publication number | Publication date |
---|---|
CN117788336A (en) | 2024-03-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111798467B (en) | Image segmentation method, device, equipment and storage medium | |
CN117408890B (en) | Video image transmission quality enhancement method and system | |
CN115797225B (en) | Unmanned ship acquired image enhancement method for underwater topography measurement | |
KR20030020357A (en) | Method and apparatus for enhancing data resolution | |
CN106920221A (en) | Take into account the exposure fusion method that Luminance Distribution and details are presented | |
CN109726649B (en) | Remote sensing image cloud detection method and system and electronic equipment | |
Bi et al. | Haze removal for a single remote sensing image using low-rank and sparse prior | |
Vijayalakshmi et al. | A systematic approach for enhancement of homogeneous background images using structural information | |
CN113286142B (en) | Artificial intelligence-based image imaging sensitivity prediction method and system | |
CN113052923A (en) | Tone mapping method, tone mapping apparatus, electronic device, and storage medium | |
CN110309715B (en) | Deep learning-based indoor positioning method, device and system for lamp identification | |
CN118397359A (en) | Convolution calculation method for improving fuzzy biological image recognition accuracy | |
CN117788336B (en) | Data optimization acquisition method and system in homeland space planning process | |
CN105574844B (en) | Rdaiation response Function Estimation method and apparatus | |
CN107527378B (en) | Metropolis ray tracing self-adaptive two-stage sampling method | |
Lee et al. | Ramp distribution-based contrast enhancement techniques and over-contrast measure | |
CN108353133A (en) | The device and method that time for exposure for reducing high dynamic range video/imaging gathers | |
CN107369138A (en) | Image based on higher order statistical model optimizes display methods | |
Gao et al. | Single image dehazing based on single pixel energy minimization | |
KR20130138435A (en) | Image enhancement method and device by brightness-contrast improvement | |
CN107274412A (en) | The method of small target deteection based on infrared image | |
Wu et al. | Contrast enhancement based on discriminative co-occurrence statistics | |
CN113487520B (en) | High dynamic range image generation method and system based on converter temperature measurement | |
CN118334589B (en) | Garden image monitoring method based on computer vision | |
Lecca | A gradient-based spatial color algorithm for image contrast enhancement |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |