Image encoding method and device
By segmenting and encoding the background and radar scanning change areas of the radar situation image separately, the problem of redundant code stream of the radar situation image in the existing technology is solved, and a more efficient encoding effect is achieved.
Patent Information
- Application Number
- CN202010628789.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-01
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2040-07-01
AI Technical Summary
The existing technology has the problem of code stream redundancy when encoding radar situation diagrams, and fails to effectively utilize image features for optimized encoding.
By judging whether the target image is a radar situation image, segmenting it into a background area and a radar scanning change area, encoding them respectively, using the number of color types and structural features for confirmation, and using HSV color space and Hough circle detection to realize the image segmentation and encoding.
It reduces code stream redundancy, improves coding efficiency, and achieves accurate recognition and optimized coding of radar situation images.
Smart Images

Figure CN112153383B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing, and in particular to an image encoding method and device. Background Art
[0002] In video encoding and decoding transmission, the radar situation map is a relatively special image. As shown in Figure 1, the radar situation map has a relatively single color, mostly one or two colors, the background area basically remains unchanged, and only the radar scanning area changes.
[0003] Existing compression coding algorithms are mostly used to encode and compress images with rich colors and no obvious features. For images such as radar situation maps, if they are processed according to conventional compression coding algorithms, the encoded bit stream is not the optimal bit stream and there is a certain bit stream redundancy. Summary of the invention
[0004] The embodiment of the present disclosure provides an image encoding method and device, which can solve the problem of certain code stream redundancy when encoding radar situation maps in the prior art. The technical solution is as follows:
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an image encoding method, the method comprising:
[0006] Get the target image;
[0007] Determining whether the target image is a radar situation image;
[0008] If the target image is a radar situation image, segmenting the target image into a background area and a radar scanning change area;
[0009] The background area and the radar scanning change area are encoded respectively.
[0010] The image encoding method provided by the embodiment of the present disclosure first obtains a target image, then determines whether the target image is a radar situation image; if the target image is a radar situation image, the target image is divided into a background area and a radar scan change area; finally, the background area and the radar scan change area are encoded respectively. The present disclosure extracts the corresponding features of the target image according to the image features of the radar situation image. If the extracted image features match the image features of the radar situation image, it is determined that the target image is a radar situation map, and the radar situation map is divided into a background area and a radar scan change area, and then the two areas are encoded respectively. Compared with the prior art, the present disclosure can reduce the code rate.
[0011] In one embodiment, determining that the target image is a radar situation image specifically includes:
[0012] Obtaining the number of color types of the target image;
[0013] When the number of color types meets a preset threshold range, determining that the target image is a suspected radar situation image;
[0014] Acquire structural features of the suspected radar situation image;
[0015] When the structural feature is a preset structure, the suspected radar situation image is determined to be a radar situation image.
[0016] The disclosed embodiment determines the target image as a suspected radar situation image by obtaining the number of color types of the target image, and then obtains the structural features of the suspected radar situation image, and further determines the suspected radar situation image as a radar situation image. The disclosed method is simple to operate, convenient and reliable, and realizes the confirmation of the target image.
[0017] In one embodiment, obtaining the number of color types of the target image includes:
[0018] Convert the target image from RGB color space to HSV color space;
[0019] Get the hue component distribution histogram of the HSV color space;
[0020] At least one peak point of the hue component distribution histogram is detected, and the number of the peak points that meet a preset condition is determined as the number of color types of the target image.
[0021] Through the above steps, the embodiment of the present disclosure can obtain the number of color types of the target image. When the number of color types meets the preset threshold range, it can be further determined that the target image is a suspected radar situation image.
[0022] In one embodiment, the structural feature of the suspected radar situation image is obtained, and when the structural feature is a preset structure, it is determined to be a radar situation image, specifically:
[0023] The suspected radar situation image is subjected to circle detection by Hough circle detection, and if it is determined that the suspected radar situation image has a circular image satisfying a preset structure, the suspected radar situation image is determined to be a radar situation image.
[0024] The embodiment of the present disclosure performs Hough circle detection on the suspected radar situation image, and determines whether it is a radar situation image according to the detection result.
[0025] In one embodiment, segmenting the target image into a background area and a radar scan change area includes:
[0026] Determine the circular image detected by Hough circle detection in the target image as a radar scanning change area;
[0027] An area in the target image except for the radar scanning change area is determined as a background area.
[0028] Through the above steps, the embodiment of the present disclosure can divide the target image into a background area and a radar scanning change area, and further realize separate encoding of the two areas to reduce the code stream.
[0029] According to a second aspect of an embodiment of the present disclosure, there is provided an image encoding device, including an acquisition module, a determination module, a segmentation module and an encoding module;
[0030] The acquisition module is used to acquire the target image;
[0031] The judging module is used to judge whether the target image is a radar situation image;
[0032] The segmentation module is used for segmenting the target image into a background area and a radar scanning change area when the target image is a radar situation image;
[0033] The encoding module is used to encode the background area and the radar scanning change area respectively.
[0034] The image encoding device provided by the embodiment of the present disclosure includes an acquisition module, a judgment module, a segmentation module and an encoding module. The present disclosure determines that the target image is a radar situation image; then segments the target image into a background area and a radar scan change area; and finally encodes the background area and the radar scan change area respectively. The present disclosure extracts the corresponding features of the target image based on the image features of the radar situation image. If the extracted image features match the image features of the radar situation image, the target image is determined to be a radar situation map, and the radar situation map is segmented into a background area and a radar scan change area, and then the two areas are encoded respectively. Compared with the prior art, the present disclosure can reduce the code rate.
[0035] In one embodiment, the judgment module includes a first acquisition unit, a first determination unit, a second acquisition unit, and a second determination unit;
[0036] The first acquisition unit is used to acquire the number of color types of the target image;
[0037] The first determination unit is configured to determine that the target image is a suspected radar situation image when the number of color types meets a preset threshold range;
[0038] The second acquisition unit is used to acquire the structural features of the suspected radar situation image;
[0039] The second determining unit is used to determine that the suspected radar situation image is a radar situation image when the structural feature is a preset structure.
[0040] The disclosed embodiment obtains the number of color types of the target image through the first acquisition unit and the first determination unit, determines the target image as a suspected radar situation image, and then obtains the structural features of the suspected radar situation image through the second acquisition unit and the second determination unit, and further determines the suspected radar situation image as a radar situation image. The disclosed device has a simple structure and realizes the confirmation of the target image.
[0041] In one embodiment, the first acquisition unit is specifically used to convert the target image from the RGB color space to the HSV color space;
[0042] Get the hue component distribution histogram of the HSV color space;
[0043] At least one peak point of the hue component distribution histogram is detected, and the number of peak points that meet a preset condition is determined as the number of color types of the target image.
[0044] The embodiment of the present disclosure can obtain the number of color types of the target image through the first acquisition unit. When the number of color types meets the preset threshold range, it can be further determined that the target image is a suspected radar situation image.
[0045] In one embodiment, the second acquisition unit is specifically configured to perform circle detection on the suspected radar situation image by Hough circle detection;
[0046] The second determining unit is specifically configured to determine that the suspected radar situation image is a radar situation image when a circular image that satisfies a preset structure exists in the suspected radar situation image.
[0047] The embodiment of the present disclosure performs Hough circle detection on the suspected radar situation image, and determines whether it is a radar situation image according to the detection result.
[0048] In one embodiment, the segmentation module is specifically used to determine the circular image detected by Hough circle detection in the target image as the radar scan change area, and determine the area in the target image other than the radar scan change area as the background area.
[0049] The disclosed embodiment can segment the target image into a background area and a radar scanning change area by setting a segmentation module, and further achieve separate encoding of the two areas to reduce the code stream.
[0050] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0052] FIG. 1 is an exemplary radar situation map; wherein the radar situation map in FIG. 1( a ) is in two colors; and the radar situation map in FIG. 1( b ) is in one color;
[0053] Figure 2 is a flowchart of an image encoding method provided by an embodiment of the present disclosure;
[0054] Figure 3 is a hue component distribution histogram in an image encoding method provided by an embodiment of the present disclosure;
[0055] Figure 4 It is a schematic diagram of effective peak points in a hue component distribution histogram in an image encoding method provided by an embodiment of the present disclosure;
[0056] FIG5 is a schematic diagram of an edge region of a grayscale image in an image encoding method provided by an embodiment of the present disclosure; FIG5(a) is a grayscale image; FIG5(b) is a binary image of an edge region of the image;
[0057] FIG6 is a Hough circle detection diagram in an image encoding method provided by an embodiment of the present disclosure; FIG6(a) is a detected circular area that meets the conditions; FIG6(b) is the position of the detected circular area on the grayscale image;
[0058] Figure 7 is a flowchart of an image encoding method provided by an embodiment of the present disclosure;
[0059] Figure 8 is a structural diagram of an image encoding device provided by an embodiment of the present disclosure;
[0060] Fig. 9 It is a structural diagram of an image encoding device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0061] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0062] The present disclosure provides an image encoding method. Figure 2As shown, the image encoding method comprises the following steps:
[0063] Step 201, acquiring a target image;
[0064] Specifically, the target image is an image to be encoded, which may be a general image or a radar situation image.
[0065] Step 202: determine whether the target image is a radar situation image;
[0066] Specifically, the radar situation image is a relatively special image with a single color, mostly one or two colors, and obvious characteristics of the changing area, while the background remains basically unchanged.
[0067] In one embodiment, step 202 of determining whether the target image is a radar situation image specifically includes:
[0068] Get the number of color types of the target image;
[0069] When the number of color types meets the preset threshold range, the target image is determined to be a suspected radar situation image;
[0070] In the embodiment of the present disclosure, by obtaining the number of color types of the target image, it is preliminarily determined whether the target image is a suspected radar situation image. For example, when the number of color types of the target image is between 3 and 5, the target image is determined to be a suspected radar situation image.
[0071] In one embodiment, the number of color types of the target image is obtained as follows:
[0072] Convert the target image from RGB color space to HSV color space;
[0073] Get the hue component distribution histogram of the HSV color space;
[0074] At least one peak point of the hue component distribution histogram is detected, and the number of peak points that meet a preset condition is determined as the number of color types of the target image.
[0075] The disclosed embodiment uses a color histogram to count the number of color types in an image, and when the number of color types in an image is within a certain numerical range, the target image can be identified as a suspicious radar situation map.
[0076] Specifically, the RGB color space is based on the three basic colors of R (Red), G (Green), and B (Blue), which are superimposed to varying degrees to produce rich and extensive colors, so it is commonly known as the three-primary color mode. The RGB color space uses a cube of unit length to represent colors. The eight common colors of black, blue, green, cyan, red, purple, yellow, and white are located at the eight vertices of the cube. Usually, black is placed at the origin of the three-dimensional rectangular coordinate system, and red, green, and blue are placed on the three coordinate axes, and the entire cube is placed in the first hexagram. As shown in the figure below. Cyan and red, purple and green, and yellow and blue are complementary colors. The value range of each parameter is: R: 0-255; G: 0-255; B: 0-255.
[0077] The HSV color space is a color space created based on the intuitive characteristics of color, also known as the hexagonal cone model. The color parameters in this model are hue H, saturation S, and brightness V. The HSV color space can more intuitively display the different colors in the image. The present disclosure converts the target image from the RGB color space to the HSV color space, which is conducive to segmenting the background area and the radar scanning change area.
[0078] Specifically, the target image is converted from RGB color space to HSV color space. The specific conversion formula is:
[0079] max = max(r, g, b);
[0080] min = min(r, g, b);
[0081]
[0082]
[0083] V=max
[0084] Among them, H is hue, S is saturation, and V is purity.
[0085] In addition, the hue component distribution histogram of the HSV color space is obtained as follows:
[0086] Divide the grayscale value interval of the hue component into a preset number of equal parts;
[0087] By counting the number of pixels in each gray value interval in the hue component, the hue component distribution histogram can be obtained.
[0088] Specifically, since the hue H component represents the hue information in the image, it is only necessary to perform histogram statistics on the grayscale of the H component when counting the number of color types. In the embodiment of the present disclosure, for example, the grayscale value interval of the H component is divided into 128 equal parts, and then the number of pixels in each grayscale value interval of the H component is counted respectively, thereby obtaining the number of pixels in the 128 intervals corresponding to the H component, that is, the H component distribution histogram, as shown in FIG. Figure 3 shown.
[0089] In the embodiment of the present disclosure, for example, the valid peak points in the detection distribution histogram are set as follows:
[0090] ValidPeak(i)=hist x (i) if hist y (i)>10000and
[0091] ValidPeak(i)-ValidPeak(i-1)≥0.1 where i∈[0,128].
[0092] By detecting the number of set conditional peak points of the H component distribution histogram, the number of color types in the image can be obtained, such as Figure 4 As shown, there are multiple peaks in the H component distribution histogram. By setting the parameter conditions, 4 peaks that meet the set conditions are obtained, and the number of color types in the image is 4.
[0093] Obtain structural features of suspected radar situation images;
[0094] When the structural feature is a preset structure, the suspected radar situation image is determined to be a radar situation image.
[0095] In one embodiment, the structural features of the suspected radar situation image are obtained, and when the structural features are preset structures, it is determined to be a radar situation image, specifically:
[0096] The suspected radar situation image is subjected to circle detection through Hough circle detection. If it is determined that the suspected radar situation image has a circular image that satisfies a preset structure, the suspected radar situation image is determined to be a radar situation image.
[0097] Specifically, Hough transform is one of the basic algorithms for identifying geometric shapes from images in image processing. The basic principle is to use the duality of points and lines to transform the lines in the image space into clustered points in the parameter space, so as to detect whether there are curves with given properties in a given image. For example, to detect a straight line, according to the straight line equation y0=kx0+b, the point (x0, y0) on the original image space plane YX can be mapped to the point (k0, b0) in the parameter space KB. To detect a circle, according to the circle equation (x0-a) 2 +(y0-b)2 =r 2 , convert the circle on the YX plane of the original image space to the abr parameter space.
[0098] For the radar situation map, since it has a more obvious feature, that is, the middle scanning area is a circle, the embodiment of the present disclosure uses Hough circle detection to perform circle detection on the suspected radar situation map of the previous step. If it is determined that there is a circular image that meets the set conditions, the image is considered to be a radar situation map.
[0099] In the embodiment of the present disclosure, circle detection is performed on the suspected radar situation image through Hough circle detection, specifically:
[0100] Convert the suspected radar situation image from RGB color space to grayscale image;
[0101] Specifically, the RGB color space is grayed out into a grayscale image, and the calculation formula is as follows:
[0102] IMG gray =R*0.299+G*0.587+B*0.114.
[0103] Detect the edge coordinate points of the grayscale image and save their coordinate positions;
[0104] In the embodiment of the present disclosure, the edge region in the grayscale image is detected according to the Sobel edge detection algorithm, as shown in FIG5 .
[0105] Transform the coordinate position into the corresponding parameter space coordinate;
[0106] Specifically, the method of transforming the coordinate position into the corresponding parameter space coordinate is the same as that of detecting the straight line by Hough transform. The edge points in the binary image are represented in another way, and the coordinate transformation is performed to transform the points on the YX plane into the ab coordinate system.
[0107] The range and step size of the angle theta and the range and step size of the radius r are set. According to the characteristics of the radar situation map, the embodiment of the disclosure sets theta∈[0, 2π], the angle step size theta_step=0.1; r∈[450, 550], the radius step size r_step=1, and uses the following formula for coordinate transformation:
[0108] x=a+r×cos(theta)
[0109] y=b+r×sin(theta)
[0110] Where (x, y) is the coordinate of a point in the edge image, a and b are the corresponding parameter space coordinates, if a>0&&a≤IMG_height, b>0&&b≤IMG_width, then the position is superimposed.
[0111] Identify whether the figure corresponding to the parameter space coordinates is a circle.
[0112] In the disclosed embodiment, after the coordinate system is converted, if there are many points on the boundary of a circle on the YX plane, there will be many circles corresponding to the ab coordinate system. Since these points in the original image are all on the same circle, then after the conversion, a and b must also satisfy the equations of all circles in the ab coordinate system. Intuitively, the circles corresponding to these many points will intersect at one point, and this intersection may be the center of the circle (a, b).
[0113] By counting the number of circles at the local intersections and taking each local maximum, we can obtain the center coordinates (a, b) of the corresponding circle in the original image. Once a circle is detected under a certain r, the value of r is determined accordingly.
[0114] After the input image is subjected to histogram statistics and Hough circle detection, if it is a radar situation map, then its circle detection result is that there is a circular shape of a set size, thereby determining that the input image is a radar situation map, as shown in FIG6 ; if there is no circle of the set size, then the image is not a radar situation map.
[0115] Step 203: If the target image is a radar situation image, the target image is segmented into a background area and a radar scanning change area.
[0116] In one embodiment, segmenting the target image into a background region and a radar scan change region includes:
[0117] The circular image detected by Hough circle detection in the target image is determined as the radar scanning change area;
[0118] The area in the target image except the radar scanning change area is determined as the background area.
[0119] The disclosed embodiment detects the circular radar scan change area through Hough circle detection, so the remaining part of the target image is the background area. In this way, the target image is divided into the background area and the radar scan change area.
[0120] Step 204: Encode the background area and the radar scan change area respectively.
[0121] Specifically, by detecting the grayscale difference between the corresponding positions of the background area and the radar scanning changed area before and after the two frames, the changed and non-changed areas are obtained, and only the changed areas are encoded during encoding, thereby saving bit stream.
[0122] The image encoding method provided by the embodiment of the present disclosure first obtains a target image, then determines whether the target image is a radar situation image; if the target image is a radar situation image, the target image is divided into a background area and a radar scan change area; finally, the background area and the radar scan change area are encoded respectively. The present disclosure extracts the corresponding features of the target image according to the image features of the radar situation image. If the extracted image features match the image features of the radar situation image, it is determined that the target image is a radar situation map, and the radar situation map is divided into a background area and a radar scan change area, and then the two areas are encoded respectively. Compared with the prior art, the present disclosure can reduce the code rate.
[0123] Based on the above Figure 2 The corresponding embodiment provides an image encoding method. Another embodiment of the present disclosure provides an image encoding method, referring to Figure 7 As shown, the image encoding method provided by this embodiment includes the following steps:
[0124] Step 301, acquiring a target image;
[0125] Step 302: Convert the target image from the RGB color space to the HSV color space;
[0126] The specific conversion formula is:
[0127] max = max(r, g, b);
[0128] min = min(r, g, b);
[0129]
[0130]
[0131] V=max
[0132] Among them, H is hue, S is saturation, and V is purity.
[0133] Step 303, obtaining a hue component distribution histogram of the HSV color space;
[0134] Step 304: Detect at least one peak point of the hue component distribution histogram, and determine the number of peak points that meet a preset condition as the number of color types of the target image;
[0135] Step 305: When the number of color types meets the preset threshold range, the target image is determined to be a suspected radar situation image;
[0136] Step 306, performing circle detection on the suspected radar situation image by Hough circle detection, if it is determined that the suspected radar situation image has a circular image that satisfies a preset structure, determining that the suspected radar situation image is a radar situation image;
[0137] Specifically, the suspected radar situation image is grayed out from the RGB color space into a grayscale image;
[0138] The calculation formula is as follows:
[0139] IMG gray =R*0.299+G*0.587+B*0.114.
[0140] Detect the edge coordinate points of the grayscale image and save their coordinate positions;
[0141] Transform the coordinate position into the corresponding parameter space coordinate;
[0142] Identify whether the figure corresponding to the parameter space coordinates is a circle;
[0143] Step 307: If the target image is a radar situation image, the target image is segmented into a background area and a radar scanning change area;
[0144] Step 308: Encode the background area and the radar scan change area respectively.
[0145] The image encoding method provided by the embodiment of the present disclosure first obtains a target image, then determines whether the target image is a radar situation image; if the target image is a radar situation image, the target image is divided into a background area and a radar scan change area; finally, the background area and the radar scan change area are encoded respectively. The present disclosure extracts the corresponding features of the target image according to the image features of the radar situation image. If the extracted image features match the image features of the radar situation image, it is determined that the target image is a radar situation map, and the radar situation map is divided into a background area and a radar scan change area, and then the two areas are encoded respectively. Compared with the prior art, the present disclosure can reduce the code rate.
[0146] Based on the above Figure 2 and Figure 7 The image encoding method described in the corresponding embodiment is as follows: an embodiment of the device disclosed herein, which can be used to execute the embodiment of the method disclosed herein.
[0147] The present disclosure provides an image encoding device. Figure 8 As shown, the image encoding device 40 includes: an acquisition module 401, a judgment module 402, a segmentation module 403 and an encoding module 404;
[0148] An acquisition module 401 is used to acquire a target image;
[0149] A determination module 402 is used to determine whether the target image is a radar situation image;
[0150] A segmentation module 403 is used to segment the target image into a background area and a radar scanning change area when the target image is a radar situation image;
[0151] The encoding module 404 is used to encode the background area and the radar scanning change area respectively.
[0152] The image encoding device provided by the embodiment of the present disclosure includes an acquisition module 401, a judgment module 402, a segmentation module 403 and an encoding module 404. The acquisition module 401 acquires the target image; the judgment module 402 determines whether the target image is a radar situation image; the segmentation module 403 is used to segment the target image into a background area and a radar scan change area when the target image is a radar situation image; the encoding module 404 encodes the background area and the radar scan change area respectively. The present disclosure extracts the corresponding features of the target image according to the image features of the radar situation image. If the extracted image features match the image features of the radar situation image, it is determined that the target image is a radar situation map, and the radar situation map is segmented into a background area and a radar scan change area, and then the two areas are encoded respectively. Compared with the prior art, the present disclosure can reduce the code rate.
[0153] In one embodiment, Fig. 9 As shown, the judgment module 402 includes a first acquisition unit 4021 , a first determination unit 4022 , a second acquisition unit 4023 , and a second determination unit 4024 .
[0154] The first acquisition unit 4021 is used to acquire the number of color types of the target image;
[0155] The first determination unit 4022 is used to determine that the target image is a suspected radar situation image when the number of color types meets a preset threshold range;
[0156] The second acquisition unit 4023 is used to acquire the structural features of the suspected radar situation image;
[0157] The second determining unit 4024 is configured to determine that the suspected radar situation image is a radar situation image when the structural feature is a preset structure.
[0158] In one embodiment, the first acquisition unit 4021 is specifically used to convert the target image from the RGB color space to the HSV color space;
[0159] Get the hue component distribution histogram of the HSV color space;
[0160] At least one peak point of the hue component distribution histogram is detected, and the number of peak points that meet a preset condition is determined as the number of color types of the target image.
[0161] In one embodiment, the second acquisition unit 4023 is specifically configured to perform circle detection on the suspected radar situation image by Hough circle detection;
[0162] The second determining unit 4024 is specifically configured to determine that the suspected radar situation image is a radar situation image when there is a circular image satisfying a preset structure in the suspected radar situation image.
[0163] In one embodiment, the segmentation module 403 is specifically used to determine the circular image detected by Hough circle detection in the target image as the radar scan change area, and determine the area in the target image other than the radar scan change area as the background area.
[0164] Based on the above Figure 2 In accordance with the image encoding method described in the embodiment, the embodiment of the present disclosure further provides a computer-readable storage medium, for example, a non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The storage medium stores computer instructions for executing the above Figure 2 The image encoding method described in the corresponding embodiment will not be repeated here.
[0165] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0166] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An image coding method, characterized in that: The method comprises: Get the target image; Determining whether the target image is a radar situation image; If the target image is a radar situation image, segmenting the target image into a background area and a radar scanning change area; Encoding the background area and the radar scanning change area respectively; Determining whether the target image is a radar situation image specifically includes: Obtaining the number of color types of the target image; When the number of color types meets a preset threshold range, determining that the target image is a suspected radar situation image; Acquire structural features of the suspected radar situation image; When the structural feature is a preset structure, determining that the suspected radar situation image is a radar situation image; The obtaining of the structural feature of the suspected radar situation image, and determining it as a radar situation image when the structural feature is a preset structure, is specifically: The suspected radar situation image is subjected to circle detection by Hough circle detection, and if it is determined that the suspected radar situation image has a circular image satisfying a preset structure, the suspected radar situation image is determined to be a radar situation image.
2. The image encoding method according to claim 1, characterized in that The step of obtaining the number of color types of the target image comprises: Convert the target image from RGB color space to HSV color space; Get the hue component distribution histogram of the HSV color space; At least one peak point of the hue component distribution histogram is detected, and the number of peak points that meet a preset condition is determined as the number of color types of the target image.
3. The image encoding method according to claim 1, characterized in that: The segmenting of the target image into a background area and a radar scanning change area comprises: Determine the circular image detected by Hough circle detection in the target image as a radar scanning change area; An area in the target image except for the radar scanning change area is determined as a background area.
4. An image encoding device, characterized in that It includes an acquisition module, a judgment module, a segmentation module and an encoding module; The acquisition module is used to acquire the target image; The judging module is used to judge whether the target image is a radar situation image; The segmentation module is used for segmenting the target image into a background area and a radar scanning change area when the target image is a radar situation image; The encoding module is used to encode the background area and the radar scanning change area respectively; The judgment module includes a first acquisition unit, a first determination unit, a second acquisition unit, and a second determination unit; The first acquisition unit is used to acquire the number of color types of the target image; The first determination unit is configured to determine that the target image is a suspected radar situation image when the number of color types meets a preset threshold range; The second acquisition unit is used to acquire the structural features of the suspected radar situation image; The second determining unit is used to determine that the suspected radar situation image is a radar situation image when the structural feature is a preset structure; The second acquisition unit is specifically configured to perform circle detection on the suspected radar situation image by Hough circle detection; The second determining unit is specifically configured to determine that the suspected radar situation image is a radar situation image when a circular image that satisfies a preset structure exists in the suspected radar situation image.
5. The image encoding device according to claim 4, characterized in that The first acquisition unit is specifically used to convert the target image from the RGB color space to the HSV color space; Get the hue component distribution histogram of the HSV color space; At least one peak point of the hue component distribution histogram is detected, and the number of peak points that meet a preset condition is determined as the number of color types of the target image.
6. The image encoding device according to claim 5, characterized in that The segmentation module is specifically used to determine the circular image detected by Hough circle detection in the target image as a radar scan change area, and determine the area in the target image other than the radar scan change area as a background area.
