Image edge optimization method, device, storage medium and apparatus
By optimizing the pixel points in the edge area of the image according to the entropy value and the water ripple propagation model in image change detection, the problem of abnormal image edge display is solved, and the shape rules and edge smoothing of the edge area of the image edge area are achieved.
Patent Information
- Application Number
- CN202210639531.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-08
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-06-08
AI Technical Summary
In image change detection, abnormal display of image edge areas, and defects such as irregular shape, uneven edges and hollowness are present.
By selecting the pixel points to be optimized based on the entropy values of each pixel point in the edge area of the image, determining the target pixel points associated with the pixel points to be optimized, and optimizing the probability value of the pixel points using the preset water ripple propagation model, determining the change state of the pixel points to be optimized based on the optimized probability value, thereby optimizing the image edge area.
Improve the display effect of image edge areas to ensure regular shape and smooth edges of image edge areas.
Smart Images

Figure CN115205139B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an image edge optimization method, equipment, storage medium and device. Background Art
[0002] Currently, image change detection suffers from the flaw of displaying anomalies at the edge of the image. For example, if a cloud is present in the image at time T1 but not in the image at time T2, the cloud region represents the change region. Because the cloud and the sky have similar colors, it is impossible to determine the state of the image edge region between the change region and the unchanged region. This results in irregular shapes, uneven edges, and holes in the image edge region. Summary of the Invention
[0003] The main purpose of the present invention is to provide an image edge optimization method, equipment, storage medium and device, aiming to solve the technical problem of abnormal display of image edge area in the existing technology of image change detection.
[0004] To achieve the above object, the present invention provides an image edge optimization method, which comprises the following steps:
[0005] Selecting pixels to be optimized from the pixels according to the entropy value of each pixel in the edge area of the image;
[0006] Determining a target pixel point associated with the pixel point to be optimized, wherein the target pixel point is a pixel point determined by a change state;
[0007] Optimizing the probability value of the pixel to be optimized based on the probability value of the target pixel using a preset water ripple propagation model, wherein the preset water ripple propagation model is used to represent the probability value relationship between each pixel;
[0008] The change state of the pixel to be optimized is determined according to the optimized probability value, and the image edge area is optimized according to the change state.
[0009] Optionally, the step of optimizing the probability value of the pixel to be optimized by using a preset water ripple propagation model based on the probability value of the target pixel includes:
[0010] Obtaining the attenuation distance between the pixel to be optimized and the target pixel;
[0011] The probability value of the pixel to be optimized is optimized through a preset water ripple propagation model based on the attenuation distance and the probability value of the target pixel.
[0012] Optionally, the preset water ripple propagation model is:
[0013] Y′ i,j =Y i,j +(Y ^ i,j -Y i,j )*β m
[0014] Where Y′ i,j is the optimized probability value, Y i,j The probability value of the pixel to be optimized, Y^ i,j is the probability value of the target pixel, β is the attenuation rate, β∈(0,1), and m is the attenuation distance.
[0015] Optionally, the step of determining a target pixel point associated with the pixel point to be optimized includes:
[0016] Determine the propagation area with the pixel to be optimized as the center point;
[0017] A target pixel point associated with the pixel point to be optimized is selected from the propagation area according to the probability value of each candidate pixel point in the propagation area.
[0018] Optionally, the step of determining a propagation area with the pixel to be optimized as the center point includes:
[0019] Determining the uncertainty degree of the pixel to be optimized according to the entropy value of the pixel to be optimized;
[0020] A propagation area is determined based on the uncertainty level with the pixel to be optimized as a center point.
[0021] Optionally, before the step of selecting pixels to be optimized from the pixels according to the entropy values of the pixels in the edge area of the image, the method further includes:
[0022] Binarize the change detection image to obtain a binary probability image;
[0023] An image edge region corresponding to the change detection image is determined according to the binary probability image.
[0024] Optionally, after the step of determining the change state of the pixel to be optimized according to the optimized probability value and optimizing the edge area of the image according to the change state, the method further includes:
[0025] Determine a changed area and an unchanged area in the change detection image according to the optimized image edge area and the binary probability image;
[0026] A change detection result of the change detection image is generated according to the changed area and the unchanged area.
[0027] In addition, to achieve the above-mentioned purpose, the present invention also proposes an image edge optimization device, which includes a memory, a processor, and an image edge optimization program stored in the memory and runnable on the processor, and the image edge optimization program is configured to implement the image edge optimization method described above.
[0028] In addition, to achieve the above-mentioned purpose, the present invention further proposes a storage medium, on which an image edge optimization program is stored. When the image edge optimization program is executed by a processor, the image edge optimization method described above is implemented.
[0029] In addition, to achieve the above-mentioned purpose, the present invention also proposes an image edge optimization device, which includes: a pixel point selection module, a pixel point determination module, a probability value optimization module and an edge area optimization module;
[0030] The pixel point selection module is used to select the pixel points to be optimized from the pixel points according to the entropy value of each pixel point in the edge area of the image;
[0031] The pixel point determination module is used to determine a target pixel point associated with the pixel point to be optimized, wherein the target pixel point is a pixel point determined by a change state;
[0032] The probability value optimization module is used to optimize the probability value of the pixel to be optimized based on the probability value of the target pixel point through a preset water ripple propagation model, and the preset water ripple propagation model is used to represent the probability value relationship between each pixel point;
[0033] The edge region optimization module is configured to determine a change state of the pixel to be optimized according to the optimized probability value, and optimize the image edge region according to the change state.
[0034] The present invention discloses selecting pixels to be optimized from pixels according to the entropy value of each pixel in the edge area of an image, determining target pixels associated with the pixels to be optimized, the target pixels being pixels with a determined change state, optimizing the probability values of the pixels to be optimized through a preset water ripple propagation model based on the probability values of the target pixels, the preset water ripple propagation model being used to represent the probability value relationship between each pixel, determining the change state of the pixels to be optimized according to the optimized probability value, and optimizing the edge area of the image according to the change state; because the present invention affects the pixels with an undetermined change state through the pixels with a determined change state, it is possible to optimize the pixels that display an erroneous change state, thereby improving the display effect of the edge area of the image. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 11 is a schematic diagram of the structure of an image edge optimization device in a hardware operating environment according to an embodiment of the present invention;
[0036] Figure 2 Schematic diagram of the process of the first embodiment of the image edge optimization method of the present invention;
[0037] Figure 3 A schematic diagram of a binary probability image according to an embodiment of the image edge optimization method of the present invention;
[0038] Figure 4 A schematic diagram of an image edge region before optimization according to an embodiment of an image edge optimization method of the present invention;
[0039] Figure 5 A schematic diagram of an optimized image edge region according to an embodiment of an image edge optimization method of the present invention;
[0040] Figure 6 Schematic diagram of the flow of the second embodiment of the image edge optimization method of the present invention;
[0041] Figure 7 A schematic diagram of a propagation area of an embodiment of an image edge optimization method of the present invention;
[0042] Figure 8 A schematic diagram of attenuation distance of an embodiment of an image edge optimization method of the present invention;
[0043] Figure 9 Schematic diagram of the flow of the third embodiment of the image edge optimization method of the present invention;
[0044] Figure 10 This is a structural block diagram of the first embodiment of the image edge optimization device of the present invention.
[0045] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0046] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0047] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of an image edge optimization device in the hardware operating environment involved in an embodiment of the present invention.
[0048] like Figure 1As shown, the image edge optimization device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display). Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface. The wired interface of the user interface 1003 may be a USB interface in the present invention. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable memory (NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0049] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the image edge optimization device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0050] like Figure 1 As shown, the memory 1005 identified as a computer storage medium may include an operating system, a network communication module, a user interface module, and an image edge optimization program.
[0051] exist Figure 1 In the image edge optimization device shown, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to the user device; the image edge optimization device calls the image edge optimization program stored in the memory 1005 through the processor 1001, and executes the image edge optimization method provided by the embodiment of the present invention.
[0052] Based on the above hardware structure, an embodiment of the image edge optimization method of the present invention is proposed.
[0053] Reference Figure 2 , Figure 2 1 is a flow chart of the first embodiment of the image edge optimization method of the present invention, which provides the first embodiment of the image edge optimization method of the present invention.
[0054] Step S10: selecting pixels to be optimized from the pixels according to the entropy values of the pixels in the edge area of the image.
[0055] It should be understood that the execution subject of this embodiment can be an image edge optimization device with data processing, network communication and program running functions, such as a computer, or other electronic devices that can achieve the same or similar functions. This embodiment does not impose any restrictions on this.
[0056] It's understandable that current image change detection suffers from the flaw of displaying anomalies in the edge regions of the image. For example, if a cloud is present in the image at time T1 but not in the image at time T2, the cloud region represents the change region. Because the cloud and the sky have similar colors, it's impossible to determine the state of the image edge region between the change region and the unchanged region, leading to defects such as irregular shapes, uneven edges, and holes in the image edge region.
[0057] In the prior art, the following two methods are usually used to optimize the edge area of an image: 1. Edge extraction algorithm: Among the classic gradient-based edge detection operators, Roberts, Prewitt, Sobel, and Laplacian operators are the most classic and commonly used. They are all pixel-based processing methods with the advantages of being simple in form and easy to implement. 2. Morphological dilation and erosion operation methods: The characteristics of morphological operations are that they can handle some edge burrs and small holes, and do not cause edge blurring problems like filtering operations. The basic operations of morphological methods on image data are dilation, erosion, and the open and close operations based on these two operations. The process of first erosion and then dilation can be used to eliminate small objects, separate objects at thin points, and smooth the boundaries of larger objects without significantly changing their area, while the process of first dilation and then erosion can eliminate small holes.
[0058] However, the edge extraction algorithm has low accuracy and high computational complexity, and the detected edges are usually discontinuous and irregular; the expansion and corrosion method of morphological operations not only modifies those uncertain pixels, but also modifies those determined pixels, which requires a large amount of computation and has a greater impact on the information of the image itself.
[0059] Therefore, in order to overcome the above-mentioned defects, in this embodiment, the preset water ripple propagation model is used to optimize only the edge areas with higher entropy values, thereby improving the display effect of the edge areas of the image.
[0060] It should be noted that the edge region of the image may be a boundary region between a changing region and an unchanged region.
[0061] For easier understanding, refer to Figure 3 This is for illustration only, but does not limit this solution. Figure 3It is a schematic diagram of a binary probability image. In the figure, the probability value of the pixel point y∈(0,1), 0 represents unchanged (black area), and 1 represents changed (white area). The edge area of the image is the black and white boundary area in the figure.
[0062] It should be noted that the entropy value can be used to represent the degree of certainty of each pixel point. The higher the entropy value, the more uncertain the state of the pixel point.
[0063] It should be understood that selecting pixels to be optimized from the pixels based on the entropy values of each pixel in the edge region of the image may be performed by determining whether the entropy values of each pixel in the edge region of the image are greater than a preset threshold, and selecting pixels having entropy values greater than the preset threshold as pixels to be optimized. The preset threshold may be pre-set, and the pixels to be optimized may be pixels whose changing state is uncertain.
[0064] Step S20: determining a target pixel point associated with the pixel point to be optimized, wherein the target pixel point is a pixel point determined by a change state.
[0065] It should be noted that the target pixel point may be a pixel point determined by the change state around the pixel to be optimized. The target pixel point may be one or more, and this embodiment does not impose any limitation on this.
[0066] It should be understood that in practical applications, a pixel probability value of 0 indicates that the pixel remains unchanged, while a pixel probability value of 1 indicates that the pixel changes. In order to influence pixels whose change states have been determined by using pixels whose change states have been determined, in this embodiment, the target pixel associated with the pixel to be optimized can be determined by selecting a pixel whose change state has been determined from the pixels associated with the pixel to be optimized as the target pixel. The pixels associated with the pixel to be optimized can be pixels surrounding the pixel to be optimized.
[0067] It can be understood that selecting a pixel point with a determined change state as a target pixel point from the pixel points associated with the pixel point to be optimized can be selecting a pixel point with the maximum and / or minimum probability value as the target pixel point from the pixel points associated with the pixel point to be optimized.
[0068] Step S30: Optimizing the probability value of the pixel to be optimized based on the probability value of the target pixel through a preset water ripple propagation model, where the preset water ripple propagation model is used to represent the probability value relationship between each pixel.
[0069] It should be noted that the preset water ripple propagation model can be pre-set to analyze the impact of pixels whose change states have been determined on pixels whose change states have not been determined.
[0070] It should be understood that optimizing the probability value of the pixel to be optimized based on the probability value of the target pixel through a preset water ripple propagation model can be achieved by inputting the probability value of the target pixel and the probability value of the pixel to be optimized into the preset water ripple propagation model to obtain the optimized probability value.
[0071] Step S40: determining the change state of the pixel to be optimized according to the optimized probability value, and optimizing the edge area of the image according to the change state.
[0072] For easier understanding, refer to Figure 4 and Figure 5 This is for illustration only, but does not limit this solution. Figure 4 This is a schematic diagram of the edge area of the image before optimization. In the figure, the black grid area represents the unchanged area, the white area represents the changed area, the shaded area represents the edge area of the image, the slash shaded area represents the pixel points with a probability value less than 0.5, and the pixel points may not have changed. The matrix shaded area represents the pixel points with a probability value greater than or equal to 0.5, and the pixel points may have changed. It can be seen from the figure that due to the uncertain change state of each pixel point in the edge area of the image, the edge area of the image has irregular shape and uneven edges.
[0073] for Figure 5 The schematic diagram of the edge area of the optimized image shows that the probability value of the pixel to be optimized is greater than 0.5 and close to 1. Therefore, it can be determined that the pixel may have changed. Figure 5 It can be seen that after optimizing the pixels that display errors in the changing state, the edge area of the image has a regular shape and smooth edges.
[0074] In a first embodiment, it is disclosed that pixels to be optimized are selected from pixels according to the entropy value of each pixel in the edge area of an image, target pixels associated with the pixels to be optimized are determined, the target pixels are pixels with a determined change state, and the probability values of the pixels to be optimized are optimized through a preset water ripple propagation model based on the probability values of the target pixels. The preset water ripple propagation model is used to represent the probability value relationship between each pixel, and the change state of the pixels to be optimized is determined according to the optimized probability value, and the edge area of the image is optimized according to the change state; since this embodiment affects the pixels with an undetermined change state through the pixels with a determined change state, the pixels with an erroneous change state display can be optimized, thereby improving the display effect of the edge area of the image.
[0075] Reference Figure 6 , Figure 6 This is a flow chart of the second embodiment of the image edge optimization method of the present invention, based on the above Figure 2 The first embodiment shown provides a second embodiment of the image edge optimization method of the present invention.
[0076] In the second embodiment, step S20 includes:
[0077] Step S201: determining a propagation area with the pixel to be optimized as the center point.
[0078] It should be understood that in real applications, the influence between pixel states propagates like ripples, spreading from lower entropy values to higher entropy values. Specifically, the probability that a pixel has not changed or may have changed will affect the probability that a pixel may have changed, thereby increasing or decreasing the probability that the latter has changed.
[0079] Therefore, in order to improve the reliability of the target pixel, in this embodiment, the propagation area that affects the state of the pixel to be optimized is first determined, and then the target pixel is selected from the propagation area.
[0080] For easier understanding, refer to Figure 7 This is for illustration only, but does not limit this solution. Figure 7 It is a schematic diagram of the propagation area. In the figure, the pixel point P to be optimized i,j (i.e. the shaded grid area in the figure) is the center point to determine the propagation area, which is a 5*5 area.
[0081] Furthermore, considering that the pixel points near the pixel point to be optimized have a high degree of uncertainty, a preset area near the pixel point to be optimized is selected as a propagation area, where pixels whose states are determined may not be obtained. Step S201 includes:
[0082] Determining the uncertainty degree of the pixel to be optimized according to the entropy value of the pixel to be optimized;
[0083] A propagation area is determined based on the uncertainty level with the pixel to be optimized as a center point.
[0084] It should be understood that, given the high degree of uncertainty surrounding the pixel to be optimized, selecting a predefined area near the pixel to be optimized as the propagation area may not yield pixels with a confirmed state. Therefore, to overcome this limitation, this embodiment first determines the degree of uncertainty surrounding the pixel to be optimized, then determines the size of the area based on the uncertainty, and finally determines the propagation area based on the area size, centered around the pixel to be optimized.
[0085] It should be noted that the entropy value can be used to represent the degree of certainty of each pixel point. The higher the entropy value, the more uncertain the state of the pixel point.
[0086] It is understandable that determining the propagation area based on the uncertainty degree with the pixel to be optimized as the center point may be determining the area size based on the uncertainty degree, and then determining the propagation area based on the area size with the pixel to be optimized as the center point.
[0087] It should be understood that determining the region size based on the uncertainty level may be performed by searching a preset region table for a region size corresponding to the uncertainty level. The preset region table includes a correspondence between the uncertainty level and the region size, and the correspondence between the uncertainty level and the region size may be pre-set.
[0088] Step S202: selecting a target pixel associated with the pixel to be optimized from the propagation area according to the probability value of each candidate pixel in the propagation area.
[0089] It can be understood that selecting the target pixel point associated with the pixel point to be optimized from the propagation area based on the probability value of each candidate pixel point in the propagation area can be selecting the candidate pixel point with the largest and / or smallest probability value from the propagation area as the target pixel point associated with the pixel point to be optimized.
[0090] For easier understanding, refer to Figure 7 This is for illustration only, but does not limit this solution. Figure 7 Schematic diagram of the propagation area. In the figure, the pixel with the smallest probability value in the area is taken as the target pixel (i.e., the black grid area in the figure).
[0091] In a second embodiment, a propagation area is determined with the pixel to be optimized as the center point, and a target pixel associated with the pixel to be optimized is selected from the propagation area based on the probability values of each candidate pixel in the propagation area. Since this embodiment first determines the propagation area that affects the state of the pixel to be optimized and then selects the target pixel from the propagation area, the reliability of the target pixel can be improved.
[0092] In the second embodiment, step S30 includes:
[0093] Step S301: Obtaining the attenuation distance between the pixel point to be optimized and the target pixel point.
[0094] It should be understood that since the influence between pixels is damped during the propagation process, when optimizing the probability value of the pixel to be optimized through the preset water ripple propagation model, the attenuation between the pixel to be optimized and the target pixel also needs to be considered.
[0095] It is understandable that in order to consider the attenuation between the pixel to be optimized and the target pixel, in this embodiment, it is also necessary to obtain the attenuation distance between the pixel to be optimized and the target pixel.
[0096] For easier understanding, refer to Figure 8 This is for illustration only, but does not limit this solution. Figure 8 Schematic diagram of attenuation distance. In the figure, the distance m from the pixel to be optimized (i.e., the shaded grid part in the figure) to the target pixel (i.e., the black grid area in the figure) is the attenuation distance.
[0097] Step S302: Optimizing the probability value of the pixel to be optimized based on the attenuation distance and the probability value of the target pixel through a preset water ripple propagation model.
[0098] It should be understood that the preset water ripple propagation model is:
[0099] Y′ i,j =Y i,j +(Y ^ i,j -Y i,j )*β m
[0100] Where Y′ i,j is the optimized probability value, Y i,j The probability value of the pixel to be optimized, Y ^ i,j is the probability value of the target pixel, β is the attenuation rate, β∈(0,1), and m is the attenuation distance.
[0101] In the second embodiment, it is disclosed to obtain the attenuation distance between the pixel to be optimized and the target pixel, and optimize the probability value of the pixel to be optimized through a preset water ripple propagation model based on the attenuation distance and the probability value of the target pixel; because this embodiment optimizes the probability value of the pixel to be optimized through the preset water ripple propagation model, it is also necessary to consider the attenuation between the pixel to be optimized and the target pixel, thereby improving the accuracy of the optimized probability value.
[0102] Reference Figure 9 , Figure 9 This is a flow chart of the third embodiment of the image edge optimization method of the present invention, based on the above Figure 2 The first embodiment shown here provides a third embodiment of the image edge optimization method of the present invention.
[0103] In the third embodiment, before step S10, the method further includes:
[0104] Step S01: Binarize the change detection image to obtain a binary probability image.
[0105] It should be understood that in order to accurately identify the edge area of the image, in this embodiment, the change detection image is first binarized to obtain a binary probability image, and then the image edge area corresponding to the change detection image is determined based on the binary probability image.
[0106] It should be noted that the change detection image may be an image obtained after image change detection is performed.
[0107] For easier understanding, refer to Figure 3 This is for illustration only, but does not limit this solution. Figure 3 It is a schematic diagram of a binary probability image. In the figure, the probability value of a pixel point is y∈(0,1), 0 represents unchanged (black area), and 1 represents changed (white area).
[0108] Step S02: determining an image edge region corresponding to the change detection image according to the binary probability image.
[0109] For easier understanding, refer to Figure 3 This is for illustration only, but does not limit this solution. Figure 3 It is a schematic diagram of a binary probability image. In the figure, the edge area of the image is the boundary area between black and white.
[0110] In a third embodiment, it is disclosed that a change detection image is binarized to obtain a binary probability image, and an image edge area corresponding to the change detection image is determined based on the binary probability image; since this embodiment pre-binarizes the change detection image, the image edge area can be accurately identified.
[0111] In the third embodiment, after step S40, the method further includes:
[0112] Step S50: determining a changed area and an unchanged area in the change detection image according to the optimized image edge area and the binary probability image.
[0113] It should be understood that in order to generate a change detection result of a change detection image, in this embodiment, the change area and the unchanged area in the change detection image are determined based on the optimized image edge area and the binary probability image, and the change detection result of the change detection image is generated based on the change area and the unchanged area.
[0114] It is understood that in practical applications, a probability value of 0 for a pixel indicates that the pixel is unchanged, and a probability value of 1 for a pixel indicates that the pixel has changed. Determining the changed and unchanged regions in the change detection image based on the optimized image edge region and the binary probability image may involve determining the probability value of each pixel in the change detection image based on the optimized image edge region and the binary probability image, and then determining the changed and unchanged regions in the change detection image based on the probability values.
[0115] Step S60: generating a change detection result of the change detection image according to the changed area and the unchanged area.
[0116] It should be understood that, in practical applications, the changed region and the unchanged region can represent the change of the image. Therefore, in this embodiment, the change detection result of the change detection image can be generated based on the changed region and the unchanged region.
[0117] The third embodiment determines the changed area and the unchanged area in the change detection image based on the optimized image edge area and the binary probability image, and generates a change detection result of the change detection image based on the changed area and the unchanged area, thereby being able to generate a change detection result of the change detection image.
[0118] In addition, an embodiment of the present invention further provides a storage medium, on which an image edge optimization program is stored. When the image edge optimization program is executed by a processor, the image edge optimization method described above is implemented.
[0119] In addition, refer to Figure 10 , an embodiment of the present invention further provides an image edge optimization device, the image edge optimization device comprising: a pixel point selection module 10, a pixel point determination module 20, a probability value optimization module 30 and an edge area optimization module 40;
[0120] The pixel point selection module 10 is used to select pixels to be optimized from the pixels according to the entropy values of the pixels in the edge area of the image.
[0121] It's understandable that current image change detection suffers from the flaw of displaying anomalies in the edge regions of the image. For example, if a cloud is present in the image at time T1 but not in the image at time T2, the cloud region represents the change region. Because the cloud and the sky have similar colors, it's impossible to determine the state of the image edge region between the change region and the unchanged region, leading to defects such as irregular shapes, uneven edges, and holes in the image edge region.
[0122] In the prior art, the following two methods are usually used to optimize the edge area of an image: 1. Edge extraction algorithm: Among the classic gradient-based edge detection operators, Roberts, Prewitt, Sobel, and Laplacian operators are the most classic and commonly used. They are all pixel-based processing methods with the advantages of being simple in form and easy to implement. 2. Morphological dilation and erosion operation methods: The characteristics of morphological operations are that they can handle some edge burrs and small holes, and do not cause edge blurring problems like filtering operations. The basic operations of morphological methods on image data are dilation, erosion, and the open and close operations based on these two operations. The process of first erosion and then dilation can be used to eliminate small objects, separate objects at thin points, and smooth the boundaries of larger objects without significantly changing their area, while the process of first dilation and then erosion can eliminate small holes.
[0123] However, the edge extraction algorithm has low accuracy and high computational complexity, and the detected edges are usually discontinuous and irregular; the expansion and corrosion method of morphological operations not only modifies those uncertain pixels, but also modifies those determined pixels, which requires a large amount of computation and has a greater impact on the information of the image itself.
[0124] Therefore, in order to overcome the above-mentioned defects, in this embodiment, the preset water ripple propagation model is used to optimize only the edge areas with higher entropy values, thereby improving the display effect of the edge areas of the image.
[0125] It should be noted that the edge region of the image may be a boundary region between a changing region and an unchanged region.
[0126] For easier understanding, refer to Figure 3 This is for illustration only, but does not limit this solution. Figure 3 It is a schematic diagram of a binary probability image. In the figure, the probability value of the pixel point y∈(0,1), 0 represents unchanged (black area), and 1 represents changed (white area). The edge area of the image is the black and white boundary area in the figure.
[0127] It should be noted that the entropy value can be used to represent the degree of certainty of each pixel point. The higher the entropy value, the more uncertain the state of the pixel point.
[0128] It should be understood that selecting pixels to be optimized from the pixels based on the entropy values of each pixel in the edge region of the image may be performed by determining whether the entropy values of each pixel in the edge region of the image are greater than a preset threshold, and selecting pixels having entropy values greater than the preset threshold as pixels to be optimized. The preset threshold may be pre-set, and the pixels to be optimized may be pixels whose changing state is uncertain.
[0129] The pixel point determination module 20 is used to determine a target pixel point associated with the pixel point to be optimized, and the target pixel point is a pixel point determined by a change state.
[0130] It should be noted that the target pixel point may be a pixel point determined by the change state around the pixel to be optimized. The target pixel point may be one or more, and this embodiment does not impose any limitation on this.
[0131] It should be understood that in practical applications, a pixel probability value of 0 indicates that the pixel remains unchanged, while a pixel probability value of 1 indicates that the pixel changes. In order to influence pixels whose change states have been determined by using pixels whose change states have been determined, in this embodiment, the target pixel associated with the pixel to be optimized can be determined by selecting a pixel whose change state has been determined from the pixels associated with the pixel to be optimized as the target pixel. The pixels associated with the pixel to be optimized can be pixels surrounding the pixel to be optimized.
[0132] It can be understood that selecting a pixel point with a determined change state as a target pixel point from the pixel points associated with the pixel point to be optimized can be selecting a pixel point with the maximum and / or minimum probability value as the target pixel point from the pixel points associated with the pixel point to be optimized.
[0133] The probability value optimization module 30 is used to optimize the probability value of the pixel to be optimized based on the probability value of the target pixel point through a preset water ripple propagation model, and the preset water ripple propagation model is used to represent the probability value relationship between each pixel point.
[0134] It should be noted that the preset water ripple propagation model can be pre-set to analyze the impact of pixels whose change states have been determined on pixels whose change states have not been determined.
[0135] It should be understood that optimizing the probability value of the pixel to be optimized based on the probability value of the target pixel through a preset water ripple propagation model can be achieved by inputting the probability value of the target pixel and the probability value of the pixel to be optimized into the preset water ripple propagation model to obtain the optimized probability value.
[0136] The edge region optimization module 40 is configured to determine a change state of the pixel to be optimized according to the optimized probability value, and optimize the image edge region according to the change state.
[0137] For easier understanding, refer to Figure 4 and Figure 5 This is for illustration only, but does not limit this solution. Figure 4This is a schematic diagram of the edge area of the image before optimization. In the figure, the black grid area represents the unchanged area, the white area represents the changed area, the shaded area represents the edge area of the image, the slash shaded area represents the pixel points with a probability value less than 0.5, and the pixel points may not have changed. The matrix shaded area represents the pixel points with a probability value greater than or equal to 0.5, and the pixel points may have changed. It can be seen from the figure that due to the uncertain change state of each pixel point in the edge area of the image, the edge area of the image has irregular shape and uneven edges.
[0138] for Figure 5 The schematic diagram of the edge area of the optimized image shows that the probability value of the pixel to be optimized is greater than 0.5 and close to 1. Therefore, it can be determined that the pixel may have changed. Figure 5 It can be seen that after optimizing the pixels that display errors in the changing state, the edge area of the image has a regular shape and smooth edges.
[0139] In this embodiment, it is disclosed that pixels to be optimized are selected from pixels according to the entropy value of each pixel in the edge area of an image, target pixels associated with the pixels to be optimized are determined, the target pixels are pixels with a determined change state, and the probability values of the pixels to be optimized are optimized through a preset water ripple propagation model based on the probability values of the target pixels. The preset water ripple propagation model is used to represent the probability value relationship between each pixel, and the change state of the pixels to be optimized is determined according to the optimized probability value, and the edge area of the image is optimized according to the change state; since this embodiment affects the pixels with an undetermined change state through the pixels with a determined change state, the pixels with an erroneous change state display can be optimized, thereby improving the display effect of the edge area of the image.
[0140] Other embodiments or specific implementations of the image edge optimization device of the present invention can refer to the above-mentioned method embodiments and will not be repeated here.
[0141] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.
[0142] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0143] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus the necessary general hardware platform, or of course by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory image (ROM) / random access memory (RAM), a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0144] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. An image edge optimization method, characterized in that: The image edge optimization method comprises the following steps: Selecting pixels to be optimized from the pixels according to the entropy value of each pixel in the edge area of the image; Determining a target pixel point associated with the pixel point to be optimized, wherein the target pixel point is a pixel point determined by a change state; Optimizing the probability value of the pixel to be optimized based on the probability value of the target pixel using a preset water ripple propagation model, wherein the preset water ripple propagation model is used to represent the probability value relationship between each pixel; Determining a change state of the pixel to be optimized according to the optimized probability value, and optimizing the edge area of the image according to the change state; The step of optimizing the probability value of the pixel to be optimized based on the probability value of the target pixel by using a preset water ripple propagation model includes: Obtaining the attenuation distance between the pixel to be optimized and the target pixel; Optimizing the probability value of the pixel to be optimized by using a preset water ripple propagation model based on the attenuation distance and the probability value of the target pixel; The preset water ripple propagation model is: Where, is the optimized probability value, The probability value of the pixel to be optimized, is the probability value of the target pixel, is the attenuation rate, , is the attenuation distance; The step of determining a target pixel point associated with the pixel point to be optimized includes: Determine the propagation area with the pixel to be optimized as the center point; A target pixel point associated with the pixel point to be optimized is selected from the propagation area according to the probability value of each candidate pixel point in the propagation area.
2. The image edge optimization method according to claim 1, wherein: The step of determining the propagation area with the pixel to be optimized as the center point includes: Determining the uncertainty degree of the pixel to be optimized according to the entropy value of the pixel to be optimized; A propagation area is determined based on the uncertainty level with the pixel to be optimized as a center point.
3. The image edge optimization method according to claim 1, wherein: Before the step of selecting the pixel points to be optimized from the pixel points according to the entropy values of the pixel points in the edge area of the image, the method further includes: Binarize the change detection image to obtain a binary probability image; An image edge region corresponding to the change detection image is determined according to the binary probability image.
4. The image edge optimization method according to claim 3, wherein: After the step of determining the change state of the pixel to be optimized according to the optimized probability value and optimizing the edge area of the image according to the change state, the method further includes: Determine a changed area and an unchanged area in the change detection image according to the optimized image edge area and the binary probability image; A change detection result of the change detection image is generated according to the changed area and the unchanged area.
5. An image edge optimization device, characterized in that: The image edge optimization device includes: a memory, a processor, and an image edge optimization program stored in the memory and executable on the processor. When the image edge optimization program is executed by the processor, the image edge optimization method according to any one of claims 1 to 4 is implemented.
6. A storage medium, characterized in that The storage medium stores an image edge optimization program, which, when executed by a processor, implements the image edge optimization method according to any one of claims 1 to 4.
7. An image edge optimization device, characterized in that: The image edge optimization device includes: a pixel point selection module, a pixel point determination module, a probability value optimization module and an edge area optimization module; The pixel point selection module is used to select the pixel points to be optimized from the pixel points according to the entropy value of each pixel point in the edge area of the image; The pixel point determination module is used to determine a target pixel point associated with the pixel point to be optimized, wherein the target pixel point is a pixel point determined by a change state; The probability value optimization module is used to optimize the probability value of the pixel to be optimized based on the probability value of the target pixel point through a preset water ripple propagation model, and the preset water ripple propagation model is used to represent the probability value relationship between each pixel point; The edge region optimization module is configured to determine a change state of the pixel to be optimized according to the optimized probability value, and optimize the image edge region according to the change state; The probability value optimization module is further configured to obtain an attenuation distance between the pixel to be optimized and the target pixel; and optimize the probability value of the pixel to be optimized using a preset water ripple propagation model based on the attenuation distance and the probability value of the target pixel; the preset water ripple propagation model is: Where, is the optimized probability value, The probability value of the pixel to be optimized, is the probability value of the target pixel, is the attenuation rate, , is the attenuation distance; The pixel point determination module is further configured to determine a propagation area with the pixel point to be optimized as a center point; and select a target pixel point associated with the pixel point to be optimized from the propagation area according to the probability value of each candidate pixel point in the propagation area.
Citation Information
Patent Citations
Fuzzy edge detection method based on object cloud
CN101286233A
Image edge detection method and device based on Canny algorithm
CN107292900A