CN116664427A - Image processing method, device, equipment and storage medium - Google Patents

Image processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN116664427A
CN116664427A CN202310612137.1A CN202310612137A CN116664427A CN 116664427 A CN116664427 A CN 116664427A CN 202310612137 A CN202310612137 A CN 202310612137A CN 116664427 A CN116664427 A CN 116664427A
Authority
CN
China
Prior art keywords
target
membership matrix
median filter
filter window
center
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310612137.1A
Other languages
Chinese (zh)
Inventor
谢泽宇
罗逍
赵德芳
陈薪宇
郑震
马欢
祁旭
祝铭含
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Faw Nanjing Technology Development Co ltd
FAW Group Corp
Original Assignee
Faw Nanjing Technology Development Co ltd
FAW Group Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Faw Nanjing Technology Development Co ltd, FAW Group Corp filed Critical Faw Nanjing Technology Development Co ltd
Priority to CN202310612137.1A priority Critical patent/CN116664427A/en
Publication of CN116664427A publication Critical patent/CN116664427A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

The invention discloses an image processing method, an image processing device, image processing equipment and a storage medium. The method comprises the following steps: acquiring a target clustering center and a target membership matrix of a target image; determining a target median filter window corresponding to each element according to the elements in the target membership matrix; filtering the target membership matrix based on a target median filter window corresponding to each element to obtain a filtered target membership matrix; the target image is processed according to the target clustering center and the filtered target membership matrix, and the problem of inaccurate image processing results caused by noise pollution of the image is solved by the technical scheme of the invention, so that the accuracy of image processing can be improved.

Description

Image processing method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to an image processing method, an image processing device, image processing equipment and a storage medium.
Background
The image processing technology can extract the target object in the image, and a large amount of valuable information can be obtained through extracting and analyzing the target object, so that the method has been applied to industries such as aerospace detection, medical diagnosis and the like. Image segmentation techniques have been a hotspot in research in the field of image processing.
The FCM clustering algorithm is a clustering algorithm based on global partitioning. When the FCM clustering algorithm is used for image processing, if the image is polluted by noise, the image processing result is inaccurate.
Disclosure of Invention
The embodiment of the invention provides an image processing method, an image processing device, image processing equipment and a storage medium, which are used for solving the problem of inaccurate image processing results caused by noise pollution of images and improving the accuracy of image processing.
According to an aspect of the present invention, there is provided an image processing method including:
acquiring a target clustering center and a target membership matrix of a target image;
determining a target median filter window corresponding to each element according to the elements in the target membership matrix;
filtering the target membership matrix based on a target median filter window corresponding to each element to obtain a filtered target membership matrix;
and processing the target image according to the target clustering center and the filtered target membership matrix.
According to another aspect of the present invention, there is provided an image processing apparatus including:
the acquisition module is used for acquiring a target clustering center and a target membership matrix of the target image;
the target median filter window determining module is used for determining a target median filter window corresponding to each element according to the elements in the target membership matrix;
the filtering module is used for filtering the target membership matrix based on a target median filtering window corresponding to each element to obtain a filtered target membership matrix;
and the image processing module is used for processing the target image according to the target clustering center and the filtered target membership matrix.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the image processing method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute the image processing method according to any one of the embodiments of the present invention.
According to the embodiment of the invention, the target clustering center and the target membership matrix of the target image are obtained; determining a target median filter window corresponding to each element according to the elements in the target membership matrix; filtering the target membership matrix based on a target median filter window corresponding to each element to obtain a filtered target membership matrix; the target image is processed according to the target clustering center and the filtered target membership matrix, so that the problem of inaccurate image processing results caused by noise pollution of the image is solved, and the accuracy of image processing can be improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an image processing method in an embodiment of the invention;
fig. 2 is a schematic structural view of an image processing apparatus in an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device in an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It will be appreciated that prior to using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to the relevant legal regulations.
Example 1
Fig. 1 is a flowchart of an image processing method according to an embodiment of the present invention, where the embodiment is applicable to an image processing case, the method may be performed by an image processing apparatus according to an embodiment of the present invention, and the apparatus may be implemented in software and/or hardware, as shown in fig. 1, and the method specifically includes the following steps:
s110, acquiring a target clustering center and a target membership matrix of the target image.
Wherein the target image is an image to be processed.
Specifically, the mode of acquiring the target cluster center and the target membership matrix of the target image may be: randomly generating an initial cluster center and an initial membership matrix corresponding to the target image; obtaining the distance similarity between the initial clustering center and other pixel points in the target image; and updating the initial clustering center and the initial membership matrix according to the distance similarity between the initial clustering center and other pixel points in the target image to obtain a target clustering center and a target membership matrix of the target image. The mode of acquiring the target clustering center and the target membership matrix of the target image may also be: randomly generating an initial cluster center and an initial membership matrix corresponding to the target image; obtaining the distance similarity between the initial clustering center and other pixel points in the target image; updating the initial clustering center and the initial membership matrix according to the distance similarity between the initial clustering center and other pixel points in the target image to obtain an updated clustering center and an updated membership matrix; acquiring the distance similarity between the updated cluster center and other pixel points in the target image; and updating the updated clustering center and the updated membership matrix according to the distance similarity between the updated clustering center and other pixel points in the target image, and iteratively executing the updating process until the iteration ending condition is met, so as to obtain the target clustering center and the target membership matrix.
S120, determining a target median filter window corresponding to each element according to the elements in the target membership matrix.
Specifically, the method for determining the target median filtering window corresponding to each element according to the elements in the target membership matrix may be: if the first condition is met before and after element filtering, determining the target median filter window corresponding to the element as a second median filter window, and if the first condition is not met before and after element filtering, determining the target median filter window corresponding to the element as a first median filter window, wherein the first condition is that the first and the second of the element are extreme values. The method for determining the target median filter window corresponding to each element according to the elements in the target membership matrix may also be as follows: filtering the membership matrix taking the target element as the center based on a first median filtering window to obtain a filtered target element; if the filtered target element and the target element are both extreme values, determining a target median filter window corresponding to the target element as a second median filter window, wherein the size of the second median filter window is larger than that of the first median filter window; and if the filtered target element is not extreme and/or the target element is not extreme, determining a target median filter window corresponding to the target element as a first median filter window.
And S130, filtering the target membership matrix based on a target median filter window corresponding to each element to obtain a filtered target membership matrix.
Specifically, the filtering of the target membership matrix based on the target median filtering window corresponding to each element may be performed in a manner of obtaining the filtered target membership matrix: filtering a window matrix taking the element as a center based on a target median filtering window corresponding to each element, wherein the window matrix is a matrix which is obtained by dividing the target membership matrix taking the element as a center and is smaller than the target median filtering window in size, a filtered window matrix corresponding to each element is obtained, and a filtered target membership matrix is generated according to the filtered window matrix corresponding to each element.
In a specific example, the invention designs a dynamic self-adaptive window, divides a target membership matrix in advance through a 3*3 window to obtain a 3*3 matrix with a first element as a center, filters the 3*3 matrix with the first element as a center, if an element corresponding to the center of the filtered matrix is an extremum and the first element is also an extremum, divides the target membership matrix through a 7*7 window to obtain a 7*7 matrix with the first element as a center, filters the 7*7 matrix with the first element as a center, determines a filtering result corresponding to the first element as a filtering result corresponding to the 7*7 matrix with the first element as a center, and generates a filtered target membership matrix according to the filtering result corresponding to each element.
In another specific example, the invention designs a dynamic self-adaptive window, divides the target membership matrix in advance through a 3*3 window to obtain a 3*3 matrix with a first element as a center, filters a 3*3 matrix with the first element as a center, and if the element corresponding to the center of the filtered matrix is not the extremum or the first element is not the extremum, determines the filtering result corresponding to the filtering of the 3*3 matrix with the first element as the center as the filtering result corresponding to the first element, and generates a filtered target membership matrix according to the filtering result corresponding to each element.
And S140, processing the target image according to the target clustering center and the filtered target membership matrix.
Specifically, the processing manner of the target image according to the target clustering center and the filtered target membership matrix may be: and if the target clustering center and the filtered target membership matrix meet the iteration ending condition, processing the target image according to the target clustering center and the filtered target membership matrix. The method for processing the target image according to the target clustering center and the filtered target membership matrix may further be: obtaining the distance similarity between the target cluster center and other pixel points in the target image; updating the target clustering center and the filtered target membership matrix according to the distance similarity between the target clustering center and other pixel points in the target image to obtain a first clustering center and a first membership matrix; and processing the target image according to the first clustering center and the first membership matrix.
Optionally, determining a target median filtering window corresponding to each element according to the elements in the target membership matrix includes:
filtering the membership matrix taking the target element as the center based on a first median filtering window to obtain a filtered target element;
if the filtered target element and the target element are both extreme values, determining a target median filter window corresponding to the target element as a second median filter window, wherein the size of the second median filter window is larger than that of the first median filter window;
and if the filtered target element is not extreme and/or the target element is not extreme, determining a target median filter window corresponding to the target element as a first median filter window.
The first median filtering window may be set for a system, or may be set for a person, or may be determined according to the number of elements in the target membership, which is not limited in the embodiment of the present invention.
The extremum is a preset value, and in the embodiment of the present invention, the extremum may be 0 or 1.
The size of the second median filter window is greater than the size of the first median filter window, and the size of the second median filter window may be preset, or the second median filter window may be determined according to the number of elements taking the membership matrix with the target element as the center as the extremum after filtering, which is not limited in the embodiment of the present invention.
Specifically, the filtering of the membership matrix with the target element as the center based on the first median filtering window may be performed in a manner that the filtered target element is obtained: dividing the membership matrix based on the first median filtering window to obtain a membership matrix taking the target element as a center, and filtering the membership matrix taking the target element as a center to obtain the filtered target element.
Specifically, if the filtered target element and the target element are both extremums, the method for determining that the target median filter window corresponding to the target element is the second median filter window may be: if the target element is an extremum and the filtered target element is an extremum, and the target element is the same as the filtered target element, determining a target median filter window corresponding to the target element as a second median filter window. That is, the membership matrix centered on the target element is filtered based on the second median filtering window, and the obtained 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, it may be determined that the target median filter window corresponding to the target element is the second median filter window.
Specifically, if the filtered target element is not extreme and/or the target element is not extreme, determining the target median filtering window corresponding to the target element as the first median filtering window, that is, if the filtered target element is not extreme and/or the target element is not extreme, filtering the membership matrix with the target element as the center based on the first median filtering window to obtain the filtered target element, and determining the filtered target element as the final filtered target element.
Optionally, before determining that the target median filter window corresponding to the target element is the second median filter window, the method further includes:
acquiring the number of elements taking a target element as a center and taking the membership degree matrix as an extremum;
and determining a second median filtering window according to the number of the elements taking the target element as the extremum in the membership matrix.
Specifically, the number of elements with extremum in the membership matrix with the target element as the center may be obtained, for example, if the first median filtering window is a 3*3 window, the number of elements with extremum in 9 elements of the membership matrix with the target element as the center is obtained.
Specifically, the method for determining the second median filtering window according to the number of elements with extremum in the membership matrix with the target element as the center may be: and determining a second median filtering window according to the number of the elements taking the target element as the center and the number of the elements taking the target element as the center in the membership matrix. The method for determining the second median filtering window according to the number of the elements taking the target element as the extremum in the membership matrix can also be as follows: if the number of the elements taking the target element as the center and taking the membership matrix as the extremum is larger than the set threshold, determining the second median filter window as an N-by-N window, and if the number of the elements taking the target element as the center and taking the membership matrix as the extremum is smaller than or equal to the set threshold, determining the second median filter window as an M-by-M window.
Optionally, before determining that the target median filter window corresponding to the target element is the second median filter window, the method further includes:
acquiring the number of elements taking a target element as a center and taking the membership matrix as an extremum after filtering;
and determining a second median filtering window according to the number of the elements taking the target element as the center and taking the membership matrix as the extremum.
Specifically, the number of elements that are extremum in the filtered membership matrix with the target element as the center may be, for example, the number of elements that are extremum in 9 elements of the filtered membership matrix with the target element as the center may be obtained if the first median filtering window is a 3*3 window.
Specifically, the method for determining the second median filtering window according to the number of elements taking the target element as the extremum in the membership matrix after filtering may be: and determining a second median filtering window according to the number of the elements taking the target element as the center and the number of the elements taking the target element as the center in the membership matrix after filtering. The method for determining the second median filter window according to the number of the elements taking the target element as the center and taking the extremum in the membership matrix after filtering may be as follows: and if the number of the elements taking the target element as the center in the membership matrix is smaller than or equal to the set threshold, determining that the second median filter window is an E.E window.
Optionally, processing the target image according to the target cluster center and the filtered target membership matrix includes:
obtaining the distance similarity between the target cluster center and other pixel points in the target image;
updating the target clustering center and the filtered target membership matrix according to the distance similarity between the target clustering center and other pixel points in the target image to obtain a first clustering center and a first membership matrix;
and processing the target image according to the first clustering center and the first membership matrix.
Specifically, the method for obtaining the distance similarity between the target cluster center and other pixel points in the target image may be: and determining the distance similarity between the target cluster center and other pixel points in the target image according to the distance between the target cluster center and other pixel points in the target image.
Specifically, the method for updating the target clustering center and the filtered target membership matrix according to the distance similarity between the target clustering center and other pixel points in the target image may be that an updating function is determined according to the distance similarity between the target clustering center and other pixel points in the target image, the filtered target membership matrix is updated based on the updating function, a first membership matrix is obtained, and the target clustering center is updated according to the first membership matrix, so as to obtain the first clustering center.
It should be noted that, in the embodiment of the present invention, the target membership matrix is filtered only before the last iteration, and the target membership matrix does not participate in the previous iterations, so that the image processing efficiency can be improved, and the complexity can be reduced.
Optionally acquiring a target cluster center and a target membership matrix of the target image, including:
acquiring the change degree corresponding to the target clustering center and the change degree corresponding to the target membership matrix;
and if the change degree of the target cluster center is smaller than a first set threshold value and the change degree of the target membership matrix is smaller than a second set threshold value, acquiring the target cluster center and the target membership matrix of the target image.
Specifically, the manner of obtaining the degree of change corresponding to the target cluster center and the degree of change corresponding to the target membership matrix may be: and determining the change degree corresponding to the target cluster center according to the cluster centers obtained by two adjacent iterations, and determining the change degree corresponding to the target membership matrix according to the membership matrix obtained by two adjacent iterations. For example, a target cluster center corresponding to the current iteration and a cluster center corresponding to the last iteration may be obtained, and a degree of change corresponding to the target cluster center is determined according to the target cluster center corresponding to the current iteration and the cluster center corresponding to the last iteration. Obtaining a target membership matrix corresponding to the current iteration and a membership matrix corresponding to the last iteration, and determining the change degree corresponding to the target membership matrix according to the target membership matrix corresponding to the current iteration and the membership matrix corresponding to the last iteration.
The first set threshold may be the same as the second set threshold, and the first set threshold may be different from the second set threshold.
It should be noted that, the invention designs a dynamic self-adaptive window, when the filtered target element and the target element are both extreme values, the searching radius is enlarged by taking the target pixel as the center, the window is adjusted to 7*7 from 3*3, and the membership value of the center point is repaired. Because the small window can filter most noise information, the large window is time-consuming, the number of times used in the same image is not large, and the algorithm time complexity is not influenced.
According to the technical scheme, a target clustering center and a target membership matrix of a target image are obtained; determining a target median filter window corresponding to each element according to the elements in the target membership matrix; filtering the target membership matrix based on a target median filter window corresponding to each element to obtain a filtered target membership matrix; the target image is processed according to the target clustering center and the filtered target membership matrix, so that the problem of inaccurate image processing results caused by noise pollution of the image is solved, and the accuracy of image processing can be improved.
Example two
Fig. 2 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention. The present embodiment may be applied to the case of image processing, and the apparatus may be implemented in software and/or hardware, and the apparatus may be integrated in any device that provides an image processing function, as shown in fig. 2, where the image processing apparatus specifically includes: an acquisition module 210, a target median filter window determination module 220, a filtering module 230, and an image processing module 240.
The acquisition module is used for acquiring a target clustering center and a target membership matrix of the target image;
the target median filter window determining module is used for determining a target median filter window corresponding to each element according to the elements in the target membership matrix;
the filtering module is used for filtering the target membership matrix based on a target median filtering window corresponding to each element to obtain a filtered target membership matrix;
and the image processing module is used for processing the target image according to the target clustering center and the filtered target membership matrix.
Optionally, the target median filtering window determining module is specifically configured to:
filtering the membership matrix taking the target element as the center based on a first median filtering window to obtain a filtered target element;
if the filtered target element and the target element are both extreme values, determining a target median filter window corresponding to the target element as a second median filter window, wherein the size of the second median filter window is larger than that of the first median filter window;
and if the filtered target element is not extreme and/or the target element is not extreme, determining a target median filter window corresponding to the target element as a first median filter window.
The product can execute the method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example III
Fig. 3 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, 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 meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 3, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having 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 specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the respective methods and processes described above, for example, an image processing method.
In some embodiments, the image processing method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the image processing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the image processing method in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out 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, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here 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 a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. An image processing method, comprising:
acquiring a target clustering center and a target membership matrix of a target image;
determining a target median filter window corresponding to each element according to the elements in the target membership matrix;
filtering the target membership matrix based on a target median filter window corresponding to each element to obtain a filtered target membership matrix;
and processing the target image according to the target clustering center and the filtered target membership matrix.
2. The method of claim 1, wherein determining a target median filter window for each element from the elements in the target membership matrix comprises:
filtering the membership matrix taking the target element as the center based on a first median filtering window to obtain a filtered target element;
if the filtered target element and the target element are both extreme values, determining a target median filter window corresponding to the target element as a second median filter window, wherein the size of the second median filter window is larger than that of the first median filter window;
and if the filtered target element is not extreme and/or the target element is not extreme, determining a target median filter window corresponding to the target element as a first median filter window.
3. The method of claim 2, further comprising, prior to determining the target median filter window corresponding to the target element as the second median filter window:
acquiring the number of elements taking a target element as a center and taking the membership degree matrix as an extremum;
and determining a second median filtering window according to the number of the elements taking the target element as the extremum in the membership matrix.
4. The method of claim 2, further comprising, prior to determining the target median filter window corresponding to the target element as the second median filter window:
acquiring the number of elements taking a target element as a center and taking the membership matrix as an extremum after filtering;
and determining a second median filtering window according to the number of the elements taking the target element as the center and taking the membership matrix as the extremum.
5. The method of claim 1, wherein processing the target image according to the target cluster center and the filtered target membership matrix comprises:
obtaining the distance similarity between the target cluster center and other pixel points in the target image;
updating the target clustering center and the filtered target membership matrix according to the distance similarity between the target clustering center and other pixel points in the target image to obtain a first clustering center and a first membership matrix;
and processing the target image according to the first clustering center and the first membership matrix.
6. The method of claim 1, wherein obtaining a target cluster center and a target membership matrix for the target image comprises:
acquiring the change degree corresponding to the target clustering center and the change degree corresponding to the target membership matrix;
and if the change degree of the target cluster center is smaller than a first set threshold value and the change degree of the target membership matrix is smaller than a second set threshold value, acquiring the target cluster center and the target membership matrix of the target image.
7. An image processing apparatus, comprising:
the acquisition module is used for acquiring a target clustering center and a target membership matrix of the target image;
the target median filter window determining module is used for determining a target median filter window corresponding to each element according to the elements in the target membership matrix;
the filtering module is used for filtering the target membership matrix based on a target median filtering window corresponding to each element to obtain a filtered target membership matrix;
and the image processing module is used for processing the target image according to the target clustering center and the filtered target membership matrix.
8. The apparatus of claim 7, wherein the target median filter window determination module is specifically configured to:
filtering the membership matrix taking the target element as the center based on a first median filtering window to obtain a filtered target element;
if the filtered target element and the target element are both extreme values, determining a target median filter window corresponding to the target element as a second median filter window, wherein the size of the second median filter window is larger than that of the first median filter window;
and if the filtered target element is not extreme and/or the target element is not extreme, determining a target median filter window corresponding to the target element as a first median filter window.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the image processing method of any one of claims 1-6.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions for causing a processor to implement the image processing method of any one of claims 1-6 when executed.
CN202310612137.1A 2023-05-26 2023-05-26 Image processing method, device, equipment and storage medium Pending CN116664427A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310612137.1A CN116664427A (en) 2023-05-26 2023-05-26 Image processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310612137.1A CN116664427A (en) 2023-05-26 2023-05-26 Image processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116664427A true CN116664427A (en) 2023-08-29

Family

ID=87709102

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310612137.1A Pending CN116664427A (en) 2023-05-26 2023-05-26 Image processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116664427A (en)

Similar Documents

Publication Publication Date Title
CN112801164A (en) Training method, device and equipment of target detection model and storage medium
CN112488060B (en) Target detection method, device, equipment and medium
CN113643260A (en) Method, apparatus, device, medium and product for detecting image quality
CN114445663A (en) Method, apparatus and computer program product for detecting challenge samples
CN113963197A (en) Image recognition method and device, electronic equipment and readable storage medium
CN116188917B (en) Defect data generation model training method, defect data generation method and device
CN115186738B (en) Model training method, device and storage medium
CN113032071B (en) Page element positioning method, page testing method, device, equipment and medium
CN116664427A (en) Image processing method, device, equipment and storage medium
CN114581711A (en) Target object detection method, apparatus, device, storage medium, and program product
CN115018730A (en) Method, device, equipment and medium for removing image stripe noise
CN114692987A (en) Time sequence data analysis method, device, equipment and storage medium
CN113361575A (en) Model training method and device and electronic equipment
CN116596941A (en) Image segmentation method, device, equipment and storage medium
CN113360688B (en) Method, device and system for constructing information base
CN116503407B (en) Method and device for detecting foreign object region in image and electronic equipment
CN116258769B (en) Positioning verification method and device, electronic equipment and storage medium
CN114694138B (en) Road surface detection method, device and equipment applied to intelligent driving
CN118191935A (en) Fault identification method and device based on edge detection, electronic equipment and medium
CN116597209A (en) Image classification method, device, equipment and storage medium
CN117557511A (en) Method and device for detecting defects of electronic equipment and storage medium
CN117275006A (en) Image processing method and device, electronic equipment and storage medium
CN117558018A (en) Method and device for extracting configuration parameters of chart, electronic equipment and storage medium
CN115147906A (en) Feature extraction method, device, equipment and storage medium
CN116580218A (en) Control method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination