CN117097901A - Road image data compression storage method - Google Patents
Road image data compression storage method Download PDFInfo
- Publication number
- CN117097901A CN117097901A CN202311349782.5A CN202311349782A CN117097901A CN 117097901 A CN117097901 A CN 117097901A CN 202311349782 A CN202311349782 A CN 202311349782A CN 117097901 A CN117097901 A CN 117097901A
- Authority
- CN
- China
- Prior art keywords
- road
- pixel block
- pixel
- target
- pixel blocks
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 33
- 238000013144 data compression Methods 0.000 title claims abstract description 17
- 230000011218 segmentation Effects 0.000 claims description 8
- 238000013507 mapping Methods 0.000 claims description 2
- 238000013500 data storage Methods 0.000 abstract description 6
- 230000005540 biological transmission Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 6
- 230000000739 chaotic effect Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000009434 installation Methods 0.000 description 2
- 230000001788 irregular Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 241001270131 Agaricus moelleri Species 0.000 description 1
- 239000010426 asphalt Substances 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/136—Incoming video signal characteristics or properties
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/174—Redundancy elimination performed by the file system
- G06F16/1744—Redundancy elimination performed by the file system using compression, e.g. sparse files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/51—Indexing; Data structures therefor; Storage structures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/119—Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/182—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
-
- 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
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Image Processing (AREA)
Abstract
The invention relates to the technical field of data compression, in particular to a road image data compression and storage method. The method comprises the following steps: collecting a road image, dividing the road image into a plurality of pixel blocks, acquiring the confidence that the pixel blocks belong to the road category based on the confusion of the pixel blocks, and identifying the road pixel blocks in the road image according to the confidence; determining a target road pixel block chain, carrying out blurring processing of a first blurring degree on road pixel blocks outside the target road pixel block chain, and carrying out blurring processing of a second blurring degree on non-road pixel blocks to obtain a target road image after blurring processing of a road image; and carrying out data compression processing on the target road image to obtain compressed data, and sending the compressed data to a server for storage. According to the method and the device, the blurring processing of different areas of information can be carried out to different degrees according to the importance degree of the different areas of information in the road image, so that the data volume is reduced, and the data transmission and storage pressures are reduced.
Description
Technical Field
The invention relates to the technical field of data compression, in particular to a road image data compression and storage method.
Background
In the scenes of vehicle navigation, automatic driving and the like, a large amount of road images are required to be acquired to acquire road information, road data are provided for vehicle navigation and automatic driving, and because the acquired road image data are large in amount, the road images are required to be compressed, and the compressed road images are uploaded to a server for storage and application.
Because the importance degree of the information of different areas in the road image is different, for example, the information of the road area is more important than the information of the non-road area, the blurring processing of different degrees can be carried out on the information of different areas according to the importance degree of the information of different areas, so that the data volume of the road image is further reduced while the use of the road image is not influenced. Therefore, how to blur the different area information in the road image to different degrees according to the importance degree of the different area information in the road image becomes a technical problem to be solved.
Disclosure of Invention
In order to solve the technical problem of how to carry out blurring processing of different areas of information in a road image according to the importance degree of the different areas of information in the road image, the invention aims to provide a road image data compression and storage method, and the adopted technical scheme is as follows:
the invention provides a road image data compression storage method, which comprises the following steps:
collecting a road image, and performing super-pixel segmentation on the road image to obtain a plurality of pixel blocks;
obtaining the confusion degree of the pixel blocks according to the brightness distribution of the pixel blocks, obtaining the confidence that the pixel blocks belong to the road category based on the confusion degree, and identifying the road pixel blocks in the road image according to the confidence;
determining a reference road pixel block from the last road pixel block of the road image, and extending above the reference road pixel block according to a set extension rule to obtain a candidate road pixel block chain;
acquiring the importance degree of the candidate road pixel block chain, and determining the candidate road pixel block chain with the maximum importance degree as a target road pixel block chain;
carrying out first-degree-of-blur blurring on road pixel blocks outside the target road pixel block chain, and carrying out second-degree-of-blur on non-road pixel blocks to obtain a target road image after the road image is subjected to blurring, wherein the first-degree-of-blur is smaller than the second-degree-of-blur;
and carrying out data compression processing on the target road image to obtain compressed data, and sending the compressed data to a server for storage.
In some embodiments, the obtaining the confusion of the pixel block according to the brightness distribution of the pixel block includes:
obtaining brightness values of pixel points in the pixel block, and dividing brightness areas of the pixel block according to the brightness values to obtain at least one brightness area;
determining a first center point of the pixel block, and establishing a first coordinate system by taking the first center point as a coordinate origin;
acquiring the number of brightness areas of each quadrant in the first coordinate system, determining the quadrant with the minimum number of brightness areas as a target quadrant, and determining the number of brightness areas of the target quadrant as a target number of brightness areas;
acquiring the average value of the brightness values of the at least one brightness area, and calculating a first quantity ratio between the quantity of each average value of the brightness values and the total quantity of the average values of the brightness values;
obtaining target distances between a second center point of the at least one brightness region and the first center point, and calculating a second quantity proportion between the quantity of each target distance and the total quantity of the target distances;
and acquiring the confusion degree according to the first quantity proportion, the second quantity proportion and the target brightness area quantity.
In some embodiments, the obtaining the confusion degree according to the first quantity ratio, the second quantity ratio, and the target brightness area quantity includes:wherein (1)>For the>Disorder of the individual pixel blocks, +.>Is->The number of target luminance areas of the pixel block, is->Index for pixel block, +.>Is->A first quantitative proportion of the mean value of the luminance values, < >>Index for mean value of luminance values, +.>For the number of different luminance value averages, +.>Is the firstA second quantitative proportion of the individual target distances, +.>Index of target distance, ++>For the number of different target distances +.>As a logarithmic function.
In some embodiments, the obtaining the confidence that the pixel block belongs to the road class based on the confusion comprises:
acquiring a confusion difference between the pixel block and a neighboring pixel block of the pixel block based on the confusion;
and acquiring a gray value average value of the pixel block, and acquiring the confidence according to the gray value average value, the confusion degree and the confusion degree difference.
In some embodiments, the obtaining the confidence level according to the gray value mean, the confusion, and the confusion difference includes:
obtaining the confidence coefficient according to a confidence coefficient formula, wherein the confidence coefficient formula comprises:wherein (1)>For the>Confidence that a block of pixels belongs to a road class, < ->Is->Disorder of the individual pixel blocks, +.>Is->Gray value mean value of individual pixel blocks, +.>Is->The +.>Disorder of the adjacent pixel blocks, +.>Is->Index of neighboring pixel blocks of the individual pixel blocks, for>Is->The number of neighboring pixel blocks of the pixel blocks, is->And->To set the weight coefficient.
In some embodiments, the determining a reference road pixel block from the last road pixel block of the road image comprises:
determining a road pixel block positioned at the central position from the last road pixel blocks as a central road pixel block;
and determining the central road pixel block and adjacent road pixel blocks at two sides of the central road pixel block as the reference road pixel block.
In some embodiments, the extending above the reference road pixel block according to the set extending rule to obtain a candidate road pixel block chain includes:
acquiring a gray average value difference value between the reference road pixel block and a neighborhood pixel block above the reference road pixel block;
determining a neighborhood pixel block with the gray average value difference value within a set difference value range as a candidate extension pixel block, and determining the candidate extension pixel block with the maximum confusion degree as a target extension pixel block;
and taking the target extension pixel block as the reference road pixel block to extend next time until the gray value mean value difference value is not in the set difference value range, ending the extension, and obtaining the candidate road pixel block chain.
In some embodiments, the obtaining the importance level of the candidate road pixel block chain includes:
establishing a second coordinate system according to the position sequence numbers and the mess of the road pixel blocks in the candidate road pixel block chain, and mapping coordinate points corresponding to the road pixel blocks in the candidate road pixel block chain into the second coordinate system;
performing linear fitting treatment on coordinate points in the second coordinate system to obtain a fitting straight line;
and acquiring the importance degree according to the slope and the intercept of the fitting straight line.
In some embodiments, the obtaining the importance level according to the slope and the intercept of the fitted straight line includes:
obtaining the importance according to an importance formula, wherein the importance formula comprises the following steps:wherein (1)>Is->Importance degree of each candidate road pixel block chain, +.>Index for candidate road pixel block chain, +.>Is->Slope of fitted straight line of each candidate road pixel block chain, +.>Is->Intercept of fitting straight line of each candidate road pixel block chain, +.>Is->The +.>The abscissa of the individual pixel blocks, +.>Is->The +.>Ordinate of the individual pixel blocks, +.>Is->Index of road pixel block in the chain of candidate road pixel blocks,/for each candidate road pixel block>Is->Number of road pixel blocks in the chain of candidate road pixel blocks.
The invention has the following beneficial effects: in the embodiment of the invention, the road image is subjected to super-pixel segmentation to obtain a plurality of pixel blocks, and the road area and the non-road area can be distinguished, so that the subsequent recognition of the road pixel blocks is facilitated. The degree of confusion reflects the degree of confusion of the brightness distribution inside the pixel blocks, and the confidence that the pixel blocks belong to the road pixel blocks and the road category is obtained through the degree of confusion because the brightness distribution of the pixel blocks located in the road area is more chaotic, so that the accuracy is higher, and a reliable basis is provided for the identification of the road pixel blocks. The target road pixel block chain reflects the road direction, the area information of the target road pixel block chain belongs to important information, and the label basis can be provided for the recognition of the road direction when the road image is applied by determining the target road pixel block chain in the road image and reserving the road pixel blocks in the target road pixel block chain without blurring processing. Because the area information outside the target road pixel block chain in the road area belongs to the secondary important information, the information of the area can be reserved to a certain extent while the data volume is reduced by carrying out blurring processing with a lower degree on the road pixel blocks outside the target road pixel block chain in the road image. Since the information of the non-road area is non-important information, the data amount of the road image can be reduced by performing a high degree of blurring processing on the non-road pixel block. Therefore, the blurring processing of different areas of information can be performed to different degrees according to the importance degree of different areas of information in the road image, so that the data volume is reduced, and the data transmission and storage pressures are reduced.
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 a road image data compression and storage method according to an embodiment of the present invention;
FIG. 2 is a schematic view of an installation position of an image acquisition device;
FIG. 3 is a schematic illustration of a road image;
FIG. 4 is a super-pixel segmentation schematic of a road image;
FIG. 5 is a schematic diagram of a target road pixel block chain;
fig. 6 is a schematic diagram of a target road image.
Description of the embodiments
In order to further describe the technical means and effects adopted by the present invention to achieve the preset purpose, the following detailed description refers to specific embodiments, structures, features and effects of a road image data compression storage method according to the present invention with reference to the accompanying drawings and preferred embodiments. 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 following specifically describes a specific scheme of the road image data compression and storage method provided by the invention with reference to the accompanying drawings.
Referring to fig. 1, a flow chart of a road image data compression and storage method according to an embodiment of the invention is shown, the method includes the following steps:
s101, collecting a road image, and performing super-pixel segmentation on the road image to obtain a plurality of pixel blocks.
In the embodiment of the present invention, fig. 2 is a schematic diagram of an installation position of an image capturing device, as shown in fig. 2, the image capturing device may be installed in a vehicle, and when the vehicle runs on a road, a road image is captured by the image capturing device, where the road image includes a road area and a non-road area. In some implementations, an image capture device may be mounted in an intermediate position behind the vehicle windshield in order to capture a complete road image. Fig. 3 is a schematic view of a road image, which can be acquired by an image acquisition device on a vehicle, as shown in fig. 3.
In some embodiments, a super-pixel segmentation algorithm may be employed to segment the road image into a plurality of pixel blocks. Alternatively, the superpixel segmentation algorithm includes, but is not limited to, a simple linear iterative clustering (Simple Linear Iterative Clustering, SLIC) algorithm. Fig. 4 is a super-pixel division schematic diagram of a road image, and after the road image is super-pixel-divided, the road image shown in fig. 4 can be obtained.
In the embodiment of the invention, the acquired road image has more non-road areas, such as vegetation, hills, clouds and the like, besides the road areas, and the difference between the road areas and the non-road areas is obvious from the visual point of view. The super-pixel segmentation is to segment the road image into irregular pixel blocks based on visual angles, and segment the road image into a plurality of irregular pixel blocks through the similarity of the characteristics such as textures, gray scales, brightness and the like between adjacent pixels, so that the region corresponding to the road can be segmented out by the pixel blocks to the greatest extent, and the road region can be conveniently identified later.
S102, obtaining the confusion degree of the pixel blocks according to the brightness distribution of the pixel blocks, obtaining the confidence that the pixel blocks belong to the road category based on the confusion degree, and identifying the road pixel blocks in the road image according to the confidence.
In the embodiment of the invention, the road is usually paved by asphalt or concrete, and due to the special property of the road material, dense spots are shown in the road image, and the confusion of pixel blocks in the road area is high.
In the embodiment of the invention, the confusion degree of the pixel block is obtained according to the brightness distribution of the pixel block, and the method comprises the following steps:
s201, obtaining brightness values of pixel points in the pixel block, and dividing brightness areas of the pixel block according to the brightness values to obtain at least one brightness area.
The road image may be converted into an HSV image, where HSV represents hue, saturation, and brightness, respectively, and then a brightness value under the V color channel for each pixel point in the HSV image is obtained.
In some embodiments, for each pixel in a pixel block, a difference in brightness value between the pixel and a neighboring pixel of the pixel may be obtained, if the difference in brightness value is within a set brightness range, it is determined that the pixel and the neighboring pixel have the same brightness, correspondingly, the pixel and the neighboring pixel are the same brightness, if the difference in brightness is not within the set brightness range, it is determined that the pixel and the neighboring pixel have different brightness, and correspondingly, the pixel and the neighboring pixel are non-same brightness. After the same brightness pixel points in the pixel block are determined, the area formed by connecting the same brightness pixel points can be used as a brightness area corresponding to brightness, and the pixel block is divided into at least one brightness area in the mode.
It should be noted that, in the embodiment of the present invention, the set brightness range may be set according to the actual requirement, and is not limited herein, and alternatively, the set brightness range may be [ -3,3].
S202, determining a first center point of the pixel block, and establishing a first coordinate system by taking the first center point as an origin of coordinates.
In some embodiments, a cross-platform computer vision processing open source software library (Open Source Computer Vision Library, openCV) may be invoked to identify a first center point of a pixel block, obtain location information of the first center point, and then establish a first coordinate system with the first center point as an origin, e.g., the first center point may be used as the origin, a horizontal right direction is a positive direction of an abscissa axis, and a vertical upward direction is a positive direction of an ordinate axis.
S203, acquiring the number of brightness areas of each quadrant in the first coordinate system, determining the quadrant with the smallest brightness area number as a target quadrant, and determining the number of brightness areas of the target quadrant as a target brightness area number.
S204, obtaining the average value of the brightness values of at least one brightness area, and calculating a first quantity ratio between the quantity of each average value of the brightness values and the total quantity of the average values of the brightness values. Wherein the total number of the average brightness values is equal to the number of the brightness areas.
In some embodiments, after the luminance value averages are obtained, the luminance value averages may be arranged in a sequence from small to large or from large to small to obtain a luminance value average sequence, and then a first quantity ratio between the number of each luminance value average in the luminance value average sequence and the total number of the luminance value averages is calculated.
S205, obtaining target distances between a second center point and a first center point of at least one brightness area, and calculating a second quantity proportion between the quantity of each target distance and the total quantity of the target distances. Wherein the total number of target distances is equal to the number of luminance areas.
In some embodiments, after the target distances are obtained, the target distances may be arranged in order from small to large or from large to small to obtain a target distance sequence, and then a second number ratio between the number of each target distance in the target distance sequence and the total number of target distances is calculated. In some implementations, openCV may be invoked to identify a second center point of the luminance region, determine position information of the second center point in the first coordinate system, and obtain, according to the position information of the second center point in the first coordinate system, a distance between the second center point and a coordinate origin of the first coordinate system as a target distance between the second center point and the second center point.
S206, obtaining the confusion degree according to the first quantity proportion, the second quantity proportion and the quantity of the target brightness areas.
Optionally, obtaining the confusion according to a confusion formula, wherein the confusion formula comprises:wherein (1)>For the>Disorder of the individual pixel blocks, +.>Is->The number of target luminance areas of the pixel block, is->Index for pixel block, +.>Is->A first quantitative proportion of the mean value of the luminance values, < >>Index for mean value of luminance values, +.>For the number of different luminance value averages, +.>Is->A second quantitative proportion of the individual target distances, +.>Index of target distance, ++>For the number of different target distances +.>As a logarithmic function.
It should be noted that, the number of the average values of different brightness values in the confusion degree formulaThe number of luminance value averages in the sequence of luminance value averages, the number of different target distances +.>May be the number of target distances in the sequence of target distances.
In the above-mentioned confusion formula, the number of target brightness regionsThe larger the difference is, the more different brightness areas are distributed in the pixel block and the more uniform the distribution of the different brightness areas is, but when the distribution of the different brightness areas is uniform in the pixel block, the more non-uniform the brightness distribution of the whole inside the pixel block is, and accordingly the disorder degree of the brightness distribution of the pixel block is->The larger; number of target luminance areas +.>Smaller indicates that the fewer different luminance areas within a pixel block, the more uneven the distribution of the different luminance areas, but when the more uneven the distribution of the different luminance areas within a pixel block, the more uneven the luminance distribution of the whole inside the pixel block, and accordingly, the luminance distribution disorder +.>The smaller, therefore, the confusion +.>And the number of target brightness regions->And has positive correlation.
The larger the luminance information entropy is, the more chaotic the luminance distribution inside the pixel block is, and accordingly, the degree of confusion +.>The smaller the luminance information entropy is, the more uniform the luminance distribution inside the pixel block is, and accordingly, the degree of confusion +.>The larger, and therefore, the degree of confusion/>And->And has a negative correlation.
The greater the interval range of the luminance value distribution, the more +.>The larger the value of (2), the greater the degree of confusion of the pixel block; the smaller the interval range of the luminance value distribution is +.>The smaller the value of (2), the smaller the clutter of the pixel block, and thus the clutter +.>And (3) withAnd has positive correlation.
In the embodiment of the invention, the confusion degree is considered to be respectively equal to the number of the target brightness areas、And->The method has the advantages that a confusion formula is built according to the correlation between the brightness regions, different influencing factors of brightness distribution in the pixel block, such as the number of different brightness regions in the pixel block, uniformity of brightness region distribution, distribution range of brightness regions and region range of brightness value distribution of pixel points in the pixel block, the accuracy of the confusion is improved, and reliable data are provided for obtaining subsequent confidence.
Because the road image is divided into a plurality of pixel blocks, there may be a case that the degree of confusion between the pixel blocks of the non-road area and the pixel blocks of the road area is similar, whether the pixel block is a road pixel block cannot be judged by the degree of confusion, the confidence that the pixel block belongs to the road pixel block needs to be further obtained, and whether the pixel block is a road pixel block is judged according to the confidence.
Further, in an embodiment of the present invention, obtaining a confidence that a pixel block belongs to a road class based on a confusion degree includes: based on the confusion, obtaining the confusion difference between the pixel blocks and the adjacent pixel blocks of the pixel blocks, obtaining the gray value average value of the pixel blocks, and obtaining the confidence according to the gray value average value, the confusion and the confusion difference.
In some embodiments, the road image may be converted into a gray image by a weighted average method, and the gray value of each pixel in the gray image is obtained, then the gray value average of each pixel is calculated according to the gray value of the pixel in the pixel block, and then the confidence is obtained according to the gray value average, the confusion and the confusion difference.
Optionally, the confidence level is obtained according to a confidence level formula, wherein the confidence level formula comprises:wherein (1)>For the>Confidence that a block of pixels belongs to a road class, < ->Is->Disorder of the individual pixel blocks, +.>Index for pixel block, +.>Is->Gray value mean value of individual pixel blocks, +.>Is->The degree of confusion of the first neighboring pixel block of the pixel blocks,/->Is->Index of neighboring pixel blocks of the individual pixel blocks, for>Is->The number of neighboring pixel blocks of the pixel blocks, is->And->To set the weight coefficient.
It should be noted that, in the embodiment of the present invention,and->Can be set according to the actual requirements, without any limitation, optionally ++>,/>=0.3。
After the confidence coefficient of the pixel block is obtained, if the confidence coefficient is larger than or equal to a set threshold value, the pixel block is determined to be a road pixel block, and if the confidence coefficient is smaller than the set threshold value, the pixel block is determined to be a non-road pixel block. Alternatively, the set threshold may be 0.8.
It can be understood that in the road image of the daily scene, the gray value of the pixel point of the road area is lower, so that the smaller the gray value average value of the pixel block is, the larger the confidence that the pixel block belongs to the road pixel block is, and correspondingly, the larger the gray value average value of the pixel block is, the smaller the confidence that the pixel block belongs to the road pixel block is, that is, the confidence that the pixel block belongs to the road pixel block is in a negative correlation with the gray value average value of the pixel block. Because the brightness distribution among the road pixel blocks has certain similarity, the smaller the disorder difference between the pixel blocks and the adjacent pixel blocks is, the larger the similarity between the pixel blocks and the adjacent pixel blocks is, and the larger the confidence that the pixel blocks belong to the road pixel blocks is; the greater the difference in clutter between a pixel block and its neighboring pixel block, the less the similarity between the pixel block and its neighboring pixel block, the less the confidence that the pixel block belongs to a road pixel block. In addition, the greater the degree of confusion of the pixel blocks, the greater the degree of confidence that the pixel blocks belong to the road pixel blocks, the smaller the degree of confusion of the pixel blocks, and the smaller the degree of confidence that the pixel blocks belong to the road pixel blocks. The confidence formula introduces confusionGray value mean of pixel block +.>And a difference in degree of confusion between a pixel block and its neighboring pixel blocksAnd calculating the confidence coefficient of the pixel block belonging to the road pixel block according to the relation between the confidence coefficient and the variable factors, so that the accuracy of the confidence coefficient is improved.
And S103, determining a reference road pixel block from the last road pixel block of the road image, and extending above the reference road pixel block according to a set extension rule to obtain a candidate road pixel block chain.
Because of the perspective imaging principle when shooting, the farther the corresponding object is from the acquisition point, the larger the corresponding scale is, namely the more blurred the corresponding object is in the image, so that when the road corresponds from near to far, the corresponding pixel distribution characteristics can show the change of a certain trend, and the extending direction corresponding to the road can be judged according to the change of the trend. Since the area of the road region below the road image is large, the pixel block located in the middle region at the lowest of the road image is typically a road pixel block.
In some embodiments, a road pixel block located at the center position is determined from the last road pixel blocks as a center road pixel block, and the center road pixel block and adjacent road pixel blocks on two sides of the center road pixel block are determined as reference road pixel blocks. The last row of road pixel blocks are the road pixel blocks of the lowest row of the road image.
In the embodiment of the invention, the central road pixel block and the adjacent road pixel blocks are selected as the reference road pixel blocks, so that the road pixel block chain which points to the extending direction of the road accurately in the follow-up candidate road pixel block chain can be ensured.
Further, in the embodiment of the present invention, extending is performed above a reference road pixel block according to a set extension rule to obtain a candidate road pixel block chain, including: and acquiring a gray average value difference value between the reference road pixel block and a neighborhood pixel block above the reference road pixel block, determining the neighborhood pixel block with the gray average value difference value within a set difference value range as a candidate extension pixel block, determining the candidate extension pixel block with the largest confusion degree as a target extension pixel block, and taking the target extension pixel block as the reference road pixel block to carry out the next extension until the gray average value difference value is not within the set difference value range, and ending the extension to obtain a candidate road pixel block chain.
The neighborhood pixel block may be an 8 neighborhood pixel block.
It should be noted that the setting difference range may be set according to the actual requirement, and is not limited herein, and alternatively, the setting difference range may be [ -5,5].
In the embodiment of the invention, when a reference road pixel block is used as a reference to extend upwards, a gray average value difference value between the reference road pixel block and a neighborhood pixel block above the reference road pixel block is determined, a neighborhood pixel block with the gray average value difference value within a set difference value range is used as a candidate extending pixel block, a candidate extending pixel block with the greatest confusion degree is determined from the candidate extending pixel blocks as a target extending pixel block, then the target extending pixel block is used as the reference road pixel block, the previous extending step is repeated, and the next extending is carried out until the neighborhood pixel block with the gray average value difference value within the set difference value range does not exist, and the candidate road pixel block chain is obtained.
After the candidate road pixel block chain is acquired, a target road pixel block chain may be selected from the candidate pixel block chains for indicating the extending direction of the road.
And S104, acquiring the importance degree of the candidate road pixel block chain, and determining the candidate road pixel block chain with the largest importance degree as the target road pixel block chain.
In the embodiment of the invention, the method for acquiring the importance degree of the candidate road pixel block chain comprises the following steps:
s301, a second coordinate system is established according to the position sequence numbers and the mess of the road pixel blocks in the candidate road pixel block chain, and coordinate points corresponding to the road pixel blocks in the candidate road pixel block chain are mapped in the second coordinate system.
In some embodiments, the second coordinate system may be established with the position number of the road pixel block in the candidate road pixel block chain as the abscissa, and the degree of confusion of the road pixel block in the candidate road pixel block chain as the ordinate, or the second coordinate system may also be established with the position number of the road pixel block in the candidate road pixel block chain as the ordinate, and the degree of confusion of the road pixel block in the candidate road pixel block chain as the abscissa, and then the coordinate points corresponding to the road pixel block in the candidate road pixel block chain are mapped in the second coordinate system.
S302, carrying out linear fitting processing on coordinate points in the second coordinate system to obtain a fitting straight line.
S303, obtaining the importance degree according to the slope and intercept of the fitting straight line.
For example, a linear fitting process may be performed on coordinate points in the second coordinate system to obtain a fitting straight line:wherein->To fit the slope of a straight line +.>To fit the intercept of the line.
Optionally, the importance level is obtained according to an importance level formula, where the importance level formula includes:wherein (1)>Importance for candidate road pixel block chain, +.>Is->Slope of fitted straight line of each candidate road pixel block chain, +.>Is->Intercept of fitting straight line of each candidate road pixel block chain, +.>Is->The +.>The abscissa of the individual pixel blocks, +.>Is->The +.>Ordinate of the individual pixel blocks, +.>Is->The number of pixel blocks in the chain of candidate road pixel blocks.
In the importance degree formula, for the slope of the fitting straight line, the larger the absolute value of the slope, the larger the probability of presenting a certain trend on the corresponding region, the more accurate the extending direction of the corresponding candidate road pixel block chain, and correspondingly, the greater the importance degree of the candidate road pixel block chain.And representing the distance from the coordinate point in the second coordinate system to the fitting straight line, wherein the smaller the distance is, the more stable the trend is, the more accurate the extending direction of the corresponding candidate road pixel block chain is, and accordingly, the greater the importance degree of the candidate road pixel block chain is.
In the embodiment of the present invention, fig. 5 is a schematic diagram of a target road pixel block chain, and as shown in fig. 5, an optimal road pixel block chain can be selected from candidate road pixel block chains according to the importance degree of the candidate road pixel block chains as the target road pixel block chain, so that the extending direction of the road can be accurately indicated by the target road pixel block chain.
S105, carrying out blurring processing of a first blurring degree on road pixel blocks outside the target road pixel block chain, and carrying out blurring processing of a second blurring degree on non-road pixel blocks, so as to obtain a target road image after the road image is subjected to blurring processing, wherein the first blurring degree is smaller than the second blurring degree.
In some embodiments, the target road image after the road image is blurred may be obtained by performing a first-degree-of-blur gaussian blur process on road pixel blocks other than the first-set-blur-check target road pixel block chain, i.e., performing a first-degree-of-blur gaussian blur process on a road region in the road image, and performing a second-degree-of-blur gaussian blur process on non-road pixel blocks, i.e., performing a second-degree-of-blur gaussian blur process on a non-road region in the road image. The sigma of the first set of fuzzy kernels is smaller than that of the second set of fuzzy kernels, alternatively, the sigma of the first set of fuzzy kernels may be 1, and the sigma of the second set of fuzzy kernels may be 3. Fig. 6 is a schematic diagram of a target road image, and the road image shown in fig. 3 may be subjected to blurring processing to obtain the target road image shown in fig. 6.
In the embodiment of the invention, the target road pixel block chain in the road image can be used for indicating the extending direction of the road, so that the target road pixel block chain is not subjected to blurring processing. The non-road area is non-important information, and the blurring processing with high blurring degree is performed on the non-road area, so that the data volume of the road image can be reduced, and important information such as a lane line and the like possibly can be contained in the road area.
And S106, performing data compression processing on the target road image to obtain compressed data, and sending the compressed data to a server for storage.
After the target road image is obtained, data compression processing can be performed on the target road image to obtain compressed data, and then the compressed data is sent to the server and stored in the storage space of the server.
In summary, in the embodiment of the present invention, the road image is super-pixel segmented to obtain a plurality of pixel blocks, so that the road area and the non-road area can be distinguished, so as to facilitate the identification of the subsequent road pixel blocks. The degree of confusion reflects the degree of confusion of the brightness distribution inside the pixel blocks, and the confidence that the pixel blocks belong to the road pixel blocks and the road category is obtained through the degree of confusion because the brightness distribution of the pixel blocks located in the road area is more chaotic, so that the accuracy is higher, and a reliable basis is provided for the identification of the road pixel blocks. The target road pixel block chain reflects the road direction, the area information of the target road pixel block chain belongs to important information, and the label basis can be provided for the recognition of the road direction when the road image is applied by determining the target road pixel block chain in the road image and reserving the road pixel blocks in the target road pixel block chain without blurring processing. Because the area information outside the target road pixel block chain in the road area belongs to the secondary important information, the information of the area can be reserved to a certain extent while the data volume is reduced by carrying out blurring processing with a lower degree on the road pixel blocks outside the target road pixel block chain in the road image. Since the information of the non-road area is non-important information, the data amount of the road image can be reduced by performing a high degree of blurring processing on the non-road pixel block. Therefore, the blurring processing of different areas of information can be performed to different degrees according to the importance degree of different areas of information in the road image, so that the data volume is reduced, and the data transmission and storage pressures are reduced.
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. The processes depicted in the accompanying drawings 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.
Claims (9)
1. A method for storing road image data in a compressed manner, the method comprising:
collecting a road image, and performing super-pixel segmentation on the road image to obtain a plurality of pixel blocks;
obtaining the confusion degree of the pixel blocks according to the brightness distribution of the pixel blocks, obtaining the confidence that the pixel blocks belong to the road category based on the confusion degree, and identifying the road pixel blocks in the road image according to the confidence;
determining a reference road pixel block from the last road pixel block of the road image, and extending above the reference road pixel block according to a set extension rule to obtain a candidate road pixel block chain;
acquiring the importance degree of the candidate road pixel block chain, and determining the candidate road pixel block chain with the maximum importance degree as a target road pixel block chain;
carrying out first-degree-of-blur blurring on road pixel blocks outside the target road pixel block chain, and carrying out second-degree-of-blur on non-road pixel blocks to obtain a target road image after the road image is subjected to blurring, wherein the first-degree-of-blur is smaller than the second-degree-of-blur;
and carrying out data compression processing on the target road image to obtain compressed data, and sending the compressed data to a server for storage.
2. The method of claim 1, wherein the obtaining the degree of confusion of the pixel block according to the brightness distribution of the pixel block comprises:
obtaining brightness values of pixel points in the pixel block, and dividing brightness areas of the pixel block according to the brightness values to obtain at least one brightness area;
determining a first center point of the pixel block, and establishing a first coordinate system by taking the first center point as a coordinate origin;
acquiring the number of brightness areas of each quadrant in the first coordinate system, determining the quadrant with the minimum number of brightness areas as a target quadrant, and determining the number of brightness areas of the target quadrant as a target number of brightness areas;
acquiring the average value of the brightness values of the at least one brightness area, and calculating a first quantity ratio between the quantity of each average value of the brightness values and the total quantity of the average values of the brightness values;
obtaining target distances between a second center point of the at least one brightness region and the first center point, and calculating a second quantity proportion between the quantity of each target distance and the total quantity of the target distances;
and acquiring the confusion degree according to the first quantity proportion, the second quantity proportion and the target brightness area quantity.
3. The method of claim 2, wherein the obtaining the confusion based on the first quantitative ratio, the second quantitative ratio, and the target luminance area quantity comprises:wherein (1)>For the>Disorder of the individual pixel blocks, +.>Is->The number of target luminance areas of the pixel block, is->Index for pixel block, +.>Is->A first quantitative proportion of the mean value of the luminance values, < >>Index for mean value of luminance values, +.>For the total number of luminance value means>Is->A second quantitative proportion of the individual target distances, +.>Index of target distance, ++>For the total number of target distances,/>As a logarithmic function.
4. A method according to any one of claims 1-3, wherein said obtaining a confidence that the pixel block belongs to a road class based on the clutter comprises:
acquiring a confusion difference between the pixel block and a neighboring pixel block of the pixel block based on the confusion;
and acquiring a gray value average value of the pixel block, and acquiring the confidence according to the gray value average value, the confusion degree and the confusion degree difference.
5. The method of claim 4, wherein the obtaining the confidence level based on the gray value mean, the confusion, and the confusion difference comprises:
obtaining the confidence coefficient according to a confidence coefficient formula, wherein the confidence coefficient formula comprises:wherein (1)>For the>Confidence that a block of pixels belongs to a road class, < ->Is->Disorder of the individual pixel blocks, +.>Is->Gray value mean value of individual pixel blocks, +.>Is->The +.>Disorder of the adjacent pixel blocks, +.>Is->Index of neighboring pixel blocks of the individual pixel blocks, for>Is->The number of neighboring pixel blocks of the pixel blocks, is->And->To set the weight coefficient.
6. The method of claim 1, wherein said determining a reference road pixel block from the last road pixel block of the road image comprises:
determining a road pixel block positioned at the central position from the last road pixel blocks as a central road pixel block;
and determining the central road pixel block and adjacent road pixel blocks at two sides of the central road pixel block as the reference road pixel block.
7. The method according to claim 1 or 6, wherein said extending over said reference road pixel block according to a set extension rule to obtain a candidate road pixel block chain comprises:
acquiring a gray average value difference value between the reference road pixel block and a neighborhood pixel block above the reference road pixel block;
determining a neighborhood pixel block with the gray average value difference value within a set difference value range as a candidate extension pixel block, and determining the candidate extension pixel block with the maximum confusion degree as a target extension pixel block;
and taking the target extension pixel block as the reference road pixel block to extend next time until the gray value mean value difference value is not in the set difference value range, ending the extension, and obtaining the candidate road pixel block chain.
8. The method of claim 1, wherein the obtaining the importance of the candidate road pixel block chain comprises:
establishing a second coordinate system according to the position sequence numbers and the mess of the road pixel blocks in the candidate road pixel block chain, and mapping coordinate points corresponding to the road pixel blocks in the candidate road pixel block chain into the second coordinate system;
performing linear fitting treatment on coordinate points in the second coordinate system to obtain a fitting straight line;
and acquiring the importance degree according to the slope and the intercept of the fitting straight line.
9. The method of claim 8, wherein the obtaining the importance level based on the slope and intercept of the fitted line comprises:
obtaining the importance according to an importance formula, wherein the importance formula comprises the following steps:wherein (1)>Is->Importance degree of each candidate road pixel block chain, +.>Index for candidate road pixel block chain, +.>Is->The slope of the fitted line of the chain of candidate road pixel blocks,/>is->Intercept of fitting straight line of each candidate road pixel block chain, +.>Is->The +.>The abscissa of the individual pixel blocks, +.>Is->The +.>Ordinate of the individual pixel blocks, +.>Is->Index of road pixel block in the chain of candidate road pixel blocks,/for each candidate road pixel block>Is->Number of road pixel blocks in the chain of candidate road pixel blocks.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311349782.5A CN117097901B (en) | 2023-10-18 | 2023-10-18 | Road image data compression storage method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311349782.5A CN117097901B (en) | 2023-10-18 | 2023-10-18 | Road image data compression storage method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117097901A true CN117097901A (en) | 2023-11-21 |
CN117097901B CN117097901B (en) | 2024-01-30 |
Family
ID=88783660
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311349782.5A Active CN117097901B (en) | 2023-10-18 | 2023-10-18 | Road image data compression storage method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117097901B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001125592A (en) * | 1999-05-31 | 2001-05-11 | Nippon Telegr & Teleph Corp <Ntt> | Speech interactive information retrieval method and device for large-scale information database, and recording medium |
CN115174918A (en) * | 2022-06-30 | 2022-10-11 | 杭州电子科技大学 | Statistical modeling-based VVC (variable valve timing) rapid code rate estimation method |
CN115578476A (en) * | 2022-11-21 | 2023-01-06 | 山东省标筑建筑规划设计有限公司 | Efficient storage method for urban and rural planning data |
CN116188495A (en) * | 2023-04-21 | 2023-05-30 | 山东无棣金土地开发建设有限公司 | High-efficiency processing method for homeland monitoring data |
-
2023
- 2023-10-18 CN CN202311349782.5A patent/CN117097901B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001125592A (en) * | 1999-05-31 | 2001-05-11 | Nippon Telegr & Teleph Corp <Ntt> | Speech interactive information retrieval method and device for large-scale information database, and recording medium |
CN115174918A (en) * | 2022-06-30 | 2022-10-11 | 杭州电子科技大学 | Statistical modeling-based VVC (variable valve timing) rapid code rate estimation method |
CN115578476A (en) * | 2022-11-21 | 2023-01-06 | 山东省标筑建筑规划设计有限公司 | Efficient storage method for urban and rural planning data |
CN116188495A (en) * | 2023-04-21 | 2023-05-30 | 山东无棣金土地开发建设有限公司 | High-efficiency processing method for homeland monitoring data |
Also Published As
Publication number | Publication date |
---|---|
CN117097901B (en) | 2024-01-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108549874B (en) | Target detection method, target detection equipment and computer-readable storage medium | |
US10032088B2 (en) | Method and system for classifying painted road markings in an automotive driver-vehicle-assistance device | |
CN111798467A (en) | Image segmentation method, device, equipment and storage medium | |
CN113538491B (en) | Edge identification method, system and storage medium based on self-adaptive threshold | |
CN113077486B (en) | Method and system for monitoring vegetation coverage rate in mountainous area | |
CN110175556B (en) | Remote sensing image cloud detection method based on Sobel operator | |
CN110852207A (en) | Blue roof building extraction method based on object-oriented image classification technology | |
CN109190452B (en) | Crop row identification method and device | |
CN112927283A (en) | Distance measuring method and device, storage medium and electronic equipment | |
CN106846343A (en) | A kind of pathological image feature extracting method based on cluster super-pixel segmentation | |
CN111222511A (en) | Infrared unmanned aerial vehicle target detection method and system | |
CN111723805B (en) | Method and related device for identifying foreground region of signal lamp | |
CN111881801A (en) | Newly-added construction land remote sensing monitoring method and equipment based on invariant detection strategy | |
US9361527B1 (en) | Method and system for classifying painted road markings in an automotive driver vehicle-assistance device | |
CN117097901B (en) | Road image data compression storage method | |
CN110765875B (en) | Method, equipment and device for detecting boundary of traffic target | |
CN116137022B (en) | Data enhancement method for underground mining remote monitoring | |
CN111738984A (en) | Skin image spot evaluation method and system based on watershed and seed filling | |
CN114638766B (en) | Method for correcting luminous remote sensing image | |
CN115063311A (en) | Quick star map tailing straight line removing method | |
CN114565597A (en) | Nighttime road pedestrian detection method based on YOLOv3-tiny-DB and transfer learning | |
CN111105394B (en) | Method and device for detecting characteristic information of luminous pellets | |
CN117911408B (en) | Road pavement construction quality detection method and system | |
CN110570447B (en) | Real-time moving target detection method based on adaptive background modeling | |
CN113436092B (en) | Method for identifying cloud region of panchromatic remote sensing image |
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 |