An image processing method, apparatus, device and storage medium
By obtaining the target cluster centers and target membership matrix of the target image, and determining and applying a mean filter window to filter the image, the problem of inaccurate processing caused by image contamination by noise is solved, and the accuracy of image processing is improved.
Patent Information
- Application Number
- CN202310612137.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-26
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2043-05-26
AI Technical Summary
Image contamination by noise leads to inaccurate image processing results.
By obtaining the target cluster centers and target membership matrix of the target image, the target median filtering window corresponding to each element is determined, and the target membership matrix is filtered based on these windows to obtain the filtered target membership matrix. Finally, the target image is processed based on the target cluster centers and the filtered target membership matrix.
It improves the accuracy of image processing and solves the problem of inaccurate image processing caused by noise pollution.
Smart Images

Figure CN116664427B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an image processing method, apparatus, device and storage medium. Background Technology
[0002] Image processing technology enables the extraction of target objects from images. Through the analysis of extracted target objects, a wealth of valuable information can be obtained, and it has already been applied in industries such as aerospace exploration and medical diagnosis. Image segmentation technology has always been a hot research topic in the field of image processing.
[0003] FCM clustering is a global partitioning-based clustering algorithm. When using FCM clustering for image processing, if the image is contaminated with noise, the processing results will be inaccurate. Summary of the Invention
[0004] This invention provides an image processing method, apparatus, device, and storage medium to solve the problem of inaccurate image processing results caused by noise contamination, thereby improving the accuracy of image processing.
[0005] According to one aspect of the present invention, an image processing method is provided, comprising:
[0006] Obtain the target cluster centers and target membership matrix of the target image;
[0007] The target median filter window corresponding to each element is determined based on the elements in the target membership matrix;
[0008] The target membership matrix is filtered based on the target median filtering window corresponding to each element to obtain the filtered target membership matrix.
[0009] The target image is processed based on the target cluster centers and the filtered target membership matrix.
[0010] According to another aspect of the present invention, an image processing apparatus is provided, the image processing apparatus comprising:
[0011] The acquisition module is used to obtain the target cluster centers and target membership matrix of the target image;
[0012] The target median filtering window determination module is used to determine the target median filtering window corresponding to each element based on the elements in the target membership matrix.
[0013] The filtering module is used to filter the target membership matrix based on the target median filtering window corresponding to each element, so as to obtain the filtered target membership matrix.
[0014] The image processing module is used to process the target image based on the target cluster center and the filtered target membership matrix.
[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0016] At least one processor; and
[0017] A memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the image processing method according to any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the image processing method according to any embodiment of the present invention.
[0020] This invention addresses the problem of inaccurate image processing results due to noise contamination by obtaining the target cluster centers and target membership matrix of the target image; determining the target median filtering window corresponding to each element in the target membership matrix based on the elements in the target membership matrix; filtering the target membership matrix based on the target median filtering window corresponding to each element to obtain the filtered target membership matrix; and processing the target image based on the target cluster centers and the filtered target membership matrix. This improves the accuracy of image processing.
[0021] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a flowchart of an image processing method according to an embodiment of the present invention;
[0024] Figure 2This is a schematic diagram of the structure of an image processing device according to an embodiment of the present invention;
[0025] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0029] Example 1
[0030] Figure 1 This is a flowchart illustrating an image processing method provided in an embodiment of the present invention. This embodiment is applicable to image processing situations. The method can be executed by an image processing device in this embodiment, which can be implemented in software and / or hardware, such as... Figure 1 As shown, the method specifically includes the following steps:
[0031] S110, obtain the target cluster center and target membership matrix of the target image.
[0032] The target image is the image to be processed.
[0033] Specifically, the method for obtaining the target cluster centers and target membership matrix of the target image can be as follows: randomly generate the initial cluster centers and initial membership matrix corresponding to the target image; obtain the distance similarity between the initial cluster centers and other pixels in the target image; update the initial cluster centers and initial membership matrix according to the distance similarity between the initial cluster centers and other pixels in the target image to obtain the target cluster centers and target membership matrix of the target image. Another way to obtain the target cluster centers and target membership matrix of the target image is as follows: randomly generate the initial cluster centers and initial membership matrix corresponding to the target image; obtain the distance similarity between the initial cluster centers and other pixels in the target image; update the initial cluster centers and initial membership matrix according to the distance similarity between the initial cluster centers and other pixels in the target image to obtain the updated cluster centers and updated membership matrix; obtain the distance similarity between the updated cluster centers and other pixels in the target image; update the updated cluster centers and updated membership matrix according to the distance similarity between the updated cluster centers and other pixels in the target image, iteratively execute the above update process until the iteration termination condition is met, and obtain the target cluster centers and target membership matrix.
[0034] S120, determine the target median filtering window corresponding to each element based on the elements in the target membership matrix.
[0035] Specifically, the method for determining the target median filtering window corresponding to each element based on the elements in the target membership matrix can be as follows: if the element satisfies a first condition before and after filtering, then the target median filtering window corresponding to the element is determined to be the second median filtering window; if the element does not satisfy the first condition before and after filtering, then the target median filtering window corresponding to the element is determined to be the first median filtering window, wherein the first condition is that the element is an extreme value before and after filtering. Alternatively, the method for determining the target median filtering window corresponding to each element based on the elements in the target membership matrix can be as follows: based on the first median filtering window, the membership matrix centered on the target element is filtered to obtain the filtered target element; if both the filtered target element and the target element are extreme values, then the target median filtering window corresponding to the target element is determined to be the second median filtering window, wherein the size of the second median filtering window is larger than the size of the first median filtering window; if the filtered target element is not an extreme value and / or the target element is not an extreme value, then the target median filtering window corresponding to the target element is determined to be the first median filtering window.
[0036] S130, the target membership matrix is filtered based on the target median filtering window corresponding to each element to obtain the filtered target membership matrix.
[0037] Specifically, the method of filtering the target membership matrix based on the target median filtering window corresponding to each element to obtain the filtered target membership matrix can be as follows: filtering the window matrix centered on the element based on the target median filtering window corresponding to each element, wherein the window matrix is a matrix with the same size as the target median filtering window obtained by dividing the target membership matrix with the element as the center, thus obtaining the filtered window matrix corresponding to each element, and generating the filtered target membership matrix based on the filtered window matrix corresponding to each element.
[0038] In a specific example, this invention designs a dynamic adaptive window. The target membership matrix is pre-divided using a 3x3 window to obtain a 3x3 matrix centered on the first element. The 3x3 matrix centered on the first element is then filtered. If the element corresponding to the center of the filtered matrix is an extreme value, and the first element is also an extreme value, then the target membership matrix is divided using a 7x7 window to obtain a 7x7 matrix centered on the first element. The 7x7 matrix centered on the first element is then filtered. The filtering result corresponding to the filtering of the 7x7 matrix centered on the first element is determined as the filtering result corresponding to the first element. The filtered target membership matrix is then generated based on the filtering result corresponding to each element.
[0039] In another specific example, the present invention designs a dynamic adaptive window. The target membership matrix is pre-divided using a 3*3 window to obtain a 3*3 matrix centered on the first element. The 3*3 matrix centered on the first element is filtered. If the element corresponding to the center of the filtered matrix is not an extreme value, or if the first element is not an extreme value, then the filtering result corresponding to the filtering of the 3*3 matrix centered on the first element is determined as the filtering result corresponding to the first element. The filtered target membership matrix is generated based on the filtering result corresponding to each element.
[0040] S140, the target image is processed based on the target cluster center and the filtered target membership matrix.
[0041] Specifically, the method of processing the target image based on the target cluster center and the filtered target membership matrix can be as follows: if the target cluster center and the filtered target membership matrix satisfy the iteration termination condition, then the target image is processed based on the target cluster center and the filtered target membership matrix. Alternatively, the method of processing the target image based on the target cluster center and the filtered target membership matrix can be as follows: obtain the distance similarity between the target cluster center and other pixels in the target image; update the target cluster center and the filtered target membership matrix based on the distance similarity between the target cluster center and other pixels in the target image to obtain a first cluster center and a first membership matrix; and process the target image based on the first cluster center and the first membership matrix.
[0042] Optionally, determining the target median filtering window corresponding to each element based on the elements in the target membership matrix includes:
[0043] The membership matrix centered on the target element is filtered based on the first median filtering window to obtain the filtered target element.
[0044] If both the filtered target element and the target element are extreme values, then the target median filtering window corresponding to the target element is determined as the second median filtering window, wherein the size of the second median filtering window is larger than the size of the first median filtering window;
[0045] If the filtered target element is not an extreme value and / or the target element is not an extreme value, then the target median filtering window corresponding to the target element is determined as the first median filtering window.
[0046] The first median filtering window can be set by the system, set manually, or determined based on the number of elements in the target membership degree. This embodiment of the invention does not impose any restrictions on this.
[0047] Wherein, the extreme value is a preset value, and in this embodiment of the invention, the extreme value can be 0 or 1.
[0048] The size of the second median filtering window is larger than the size of the first median filtering window. The size of the second median filtering window can be preset, or it can be determined based on the number of extreme elements in the membership matrix centered on the target element. Alternatively, it can be determined based on the number of extreme elements in the filtered membership matrix centered on the target element. This embodiment of the invention does not impose any restrictions on this.
[0049] Specifically, the method for filtering the membership matrix centered on the target element based on the first median filtering window to obtain the filtered target element can be as follows: the membership matrix is divided based on the first median filtering window to obtain the membership matrix centered on the target element, and the membership matrix centered on the target element is filtered to obtain the filtered target element.
[0050] Specifically, if both the filtered target element and the target element are extreme values, the method for determining the target median filtering window corresponding to the target element as the second median filtering window can be as follows: if the target element is an extreme value, and the filtered target element is also an extreme value, and the target element and the filtered target element are the same, then the target median filtering window corresponding to the target element is determined as the second median filtering window. That is, the membership matrix centered on the target element is filtered based on the second median filtering window, and the filtered target element is determined as the final filtered target element. For example, if the target element is 0, and the filtered target element is also 0, then the target median filtering window corresponding to the target element is determined as the second median filtering window.
[0051] Specifically, if the filtered target element is not an extreme value and / or the target element is not an extreme value, then the target median filtering window corresponding to the target element is determined as the first median filtering window. That is, if the filtered target element is not an extreme value and / or the target element is not an extreme value, then the membership matrix centered on the target element will be filtered based on the first median filtering window, and the filtered target element will be determined as the final filtered target element.
[0052] Optionally, before determining the target median filtering window corresponding to the target element as the second median filtering window, the method further includes:
[0053] Obtain the number of elements that are extreme values in the membership matrix centered on the target element;
[0054] The second median filtering window is determined based on the number of extreme elements in the membership matrix centered on the target element.
[0055] Specifically, obtain the number of elements that are extreme values in the membership matrix centered on the target element. For example, if the first median filter window is a 3*3 window, obtain the number of elements that are extreme values among the 9 elements of the membership matrix centered on the target element.
[0056] Specifically, the method for determining the second median filtering window based on the number of extreme elements in the membership matrix centered on the target element can be as follows: The second median filtering window is determined based on the number of extreme elements in the membership matrix centered on the target element and the total number of elements in the membership matrix centered on the target element. Alternatively, the method can be as follows: if the number of extreme elements in the membership matrix centered on the target element is greater than a set threshold, then the second median filtering window is determined to be an N*N window; if the number of extreme elements in the membership matrix centered on the target element is less than or equal to the set threshold, then the second median filtering window is determined to be an M*M window.
[0057] Optionally, before determining the target median filtering window corresponding to the target element as the second median filtering window, the method further includes:
[0058] Obtain the number of elements that are extreme values in the filtered membership matrix centered on the target element;
[0059] The second median filtering window is determined based on the number of extreme elements in the filtered membership matrix centered on the target element.
[0060] Specifically, the number of extreme elements in the filtered membership matrix centered on the target element can be obtained. For example, if the first median filtering window is a 3*3 window, the number of extreme elements among the 9 elements in the filtered membership matrix centered on the target element can be obtained.
[0061] Specifically, the method for determining the second median filtering window based on the number of extreme elements in the filtered membership matrix centered on the target element can be as follows: The second median filtering window is determined based on the number of extreme elements in the filtered membership matrix centered on the target element and the total number of elements in the filtered membership matrix centered on the target element. Alternatively, the method can be as follows: if the number of extreme elements in the filtered membership matrix centered on the target element is greater than a set threshold, then the second median filtering window is determined to be an R*R window; if the number of extreme elements in the filtered membership matrix centered on the target element is less than or equal to the set threshold, then the second median filtering window is determined to be an E*E window.
[0062] Optionally, the target image is processed based on the target cluster centers and the filtered target membership matrix, including:
[0063] Obtain the distance similarity between the target cluster center and other pixels in the target image;
[0064] The target cluster center and the filtered target membership matrix are updated based on the distance similarity between the target cluster center and other pixels in the target image to obtain the first cluster center and the first membership matrix.
[0065] The target image is processed based on the first cluster center and the first membership matrix.
[0066] Specifically, the method for obtaining the distance similarity between the target cluster center and other pixels in the target image can be: determining the distance similarity between the target cluster center and other pixels in the target image based on the distance between the target cluster center and other pixels in the target image.
[0067] Specifically, the method for updating the target cluster center and the filtered target membership matrix based on the distance similarity between the target cluster center and other pixels in the target image to obtain the first cluster center and the first membership matrix can be as follows: determine the update function based on the distance similarity between the target cluster center and other pixels in the target image; update the filtered target membership matrix based on the update function to obtain the first membership matrix; and update the target cluster center based on the first membership matrix to obtain the first cluster center.
[0068] It should be noted that, in this embodiment of the invention, the target membership matrix is filtered only before the last iteration and is not included in the previous iterations, which can improve image processing efficiency and reduce complexity.
[0069] Optional methods for obtaining the target image's target cluster centers and target membership matrix include:
[0070] Obtain the degree of change corresponding to the target cluster centers and the degree of change corresponding to the target membership matrix;
[0071] If the degree of change of the target cluster center is less than a first set threshold, and the degree of change of the target membership matrix is less than a second set threshold, then the target cluster center and target membership matrix of the target image are obtained.
[0072] Specifically, the method for obtaining the degree of change corresponding to the target cluster centers and the degree of change corresponding to the target membership matrix can be as follows: determine the degree of change corresponding to the target cluster centers based on the cluster centers obtained in two adjacent iterations, and determine the degree of change corresponding to the target membership matrix based on the membership matrices obtained in two adjacent iterations. For example, it can be to obtain the target cluster centers corresponding to the current iteration and the cluster centers corresponding to the previous iteration, and determine the degree of change corresponding to the target cluster centers based on the target cluster centers corresponding to the current iteration and the cluster centers corresponding to the previous iteration. Alternatively, it can be to obtain the target membership matrix corresponding to the current iteration and the membership matrix corresponding to the previous iteration, and determine the degree of change corresponding to the target membership matrix based on the target membership matrix corresponding to the current iteration and the membership matrix corresponding to the previous iteration.
[0073] The first set threshold may be the same as the second set threshold, or the first set threshold may be different from the second set threshold. This embodiment of the invention does not impose any restrictions on this.
[0074] It should be noted that this invention designs a dynamically adaptive window. When both the filtered target element and the target element are extreme values, the search radius is expanded with the target pixel as the center, adjusting the window from 3*3 to 7*7, and repairing the membership value of the center point. Since the small window can filter out most of the noise information, although the large window is more time-consuming, it is not used many times in the same image and will not affect the algorithm's time complexity.
[0075] The technical solution of this embodiment obtains the target cluster centers and target membership matrix of the target image; determines the target median filtering window corresponding to each element according to the elements in the target membership matrix; filters the target membership matrix based on the target median filtering window corresponding to each element to obtain the filtered target membership matrix; and processes the target image according to the target cluster centers and the filtered target membership matrix. This solves the problem of inaccurate image processing results due to image contamination by noise, and improves the accuracy of image processing.
[0076] Example 2
[0077] Figure 2 This is a schematic diagram of an image processing apparatus provided in an embodiment of the present invention. This embodiment is applicable to image processing applications. The apparatus can be implemented using software and / or hardware, and can be integrated into any device that provides image processing functionality, such as… Figure 2 As shown, the image processing device specifically includes: an acquisition module 210, a target median filtering window determination module 220, a filtering module 230, and an image processing module 240.
[0078] The acquisition module is used to acquire the target cluster centers and target membership matrix of the target image.
[0079] The target median filtering window determination module is used to determine the target median filtering window corresponding to each element based on the elements in the target membership matrix.
[0080] The filtering module is used to filter the target membership matrix based on the target median filtering window corresponding to each element, so as to obtain the filtered target membership matrix.
[0081] The image processing module is used to process the target image based on the target cluster center and the filtered target membership matrix.
[0082] Optionally, the target median filtering window determination module is specifically used for:
[0083] The membership matrix centered on the target element is filtered based on the first median filtering window to obtain the filtered target element.
[0084] If both the filtered target element and the target element are extreme values, then the target median filtering window corresponding to the target element is determined as the second median filtering window, wherein the size of the second median filtering window is larger than the size of the first median filtering window;
[0085] If the filtered target element is not an extreme value and / or the target element is not an extreme value, then the target median filtering window corresponding to the target element is determined as the first median filtering window.
[0086] The above-described products can perform the methods provided in any embodiment of the present invention, and have the corresponding functional modules and beneficial effects for performing the methods.
[0087] Example 3
[0088] Figure 3 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0089] like Figure 3As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0090] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0091] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as image processing methods.
[0092] In some embodiments, the image processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the image processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the image processing method by any other suitable means (e.g., by means of firmware).
[0093] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0094] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0095] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0096] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0097] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0098] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0099] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0100] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. An image processing method, characterized in that, include: Obtain the target cluster centers and target membership matrix of the target image; Determining the target median filtering window corresponding to each element based on the elements in the target membership matrix includes: filtering the membership matrix centered on the target element based on the first median filtering window to obtain the filtered target element; if both the filtered target element and the target element are extreme values, then determining the target median filtering window corresponding to the target element as a second median filtering window, wherein the size of the second median filtering window is larger than the size of the first median filtering window; if the filtered target element is not an extreme value and / or the target element is not an extreme value, then determining the target median filtering window corresponding to the target element as a first median filtering window; wherein the first median filtering window is determined based on the number of elements in the target membership matrix. The target membership matrix is filtered based on the target median filtering window corresponding to each element to obtain the filtered target membership matrix. Processing the target image based on the target cluster center and the filtered target membership matrix includes: obtaining the distance similarity between the target cluster center and other pixels in the target image; updating the target cluster center and the filtered target membership matrix based on the distance similarity between the target cluster center and other pixels in the target image to obtain a first cluster center and a first membership matrix; and processing the target image based on the first cluster center and the first membership matrix.
2. The method according to claim 1, characterized in that, Before determining the target median filtering window corresponding to the target element as the second median filtering window, the method further includes: Obtain the number of elements that are extreme values in the membership matrix centered on the target element; The second median filtering window is determined based on the number of extreme elements in the membership matrix centered on the target element.
3. The method according to claim 1, characterized in that, Before determining the target median filtering window corresponding to the target element as the second median filtering window, the method further includes: Obtain the number of elements that are extreme values in the filtered membership matrix centered on the target element; The second median filtering window is determined based on the number of extreme elements in the filtered membership matrix centered on the target element.
4. The method according to claim 1, characterized in that, Obtain the target cluster centers and target membership matrix of the target image, including: Obtain the degree of change corresponding to the target cluster centers and the degree of change corresponding to the target membership matrix; If the degree of change of the target cluster center is less than a first set threshold, and the degree of change of the target membership matrix is less than a second set threshold, then the target cluster center and target membership matrix of the target image are obtained.
5. An image processing apparatus, characterized in that, include: The acquisition module is used to obtain the target cluster centers and target membership matrix of the target image; The target median filtering window determination module is used to determine the target median filtering window corresponding to each element based on the elements in the target membership matrix. The target median filtering window determination module is specifically used to filter the membership matrix centered on the target element based on the first median filtering window to obtain the filtered target element. If both the filtered target element and the target element are extreme values, then the target median filtering window corresponding to the target element is determined as the second median filtering window, wherein the size of the second median filtering window is larger than the size of the first median filtering window; if the filtered target element is not an extreme value and / or the target element is not an extreme value, then the target median filtering window corresponding to the target element is determined as the first median filtering window; wherein the first median filtering window is determined based on the number of elements in the target membership degree. The filtering module is used to filter the target membership matrix based on the target median filtering window corresponding to each element, so as to obtain the filtered target membership matrix. The image processing module is used to process the target image based on the target cluster center and the filtered target membership matrix; The image processing module is specifically used to obtain the distance similarity between the target cluster center and other pixels in the target image; update the target cluster center and the filtered target membership matrix according to the distance similarity between the target cluster center and other pixels in the target image to obtain a first cluster center and a first membership matrix; and process the target image according to the first cluster center and the first membership matrix.
6. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the image processing method according to any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the image processing method according to any one of claims 1-4.
Citation Information
Patent Citations
Fuzzy clustering image segmentation method based on morphological reconstruction and membership filtering
CN109285175A
Overlay shadow detection method and device based on superpixel segmentation
CN115131555A
Focus area segmentation method for cardiovascular and cerebrovascular radiography
CN115661135A
Image segmentation method, device and equipment and computer storage medium
CN115661162A