CN109801239B - Method and device for eliminating highlight area of microsurgery image - Google Patents

Method and device for eliminating highlight area of microsurgery image Download PDF

Info

Publication number
CN109801239B
CN109801239B CN201910033571.8A CN201910033571A CN109801239B CN 109801239 B CN109801239 B CN 109801239B CN 201910033571 A CN201910033571 A CN 201910033571A CN 109801239 B CN109801239 B CN 109801239B
Authority
CN
China
Prior art keywords
pixel
image
highlight
point
edge
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.)
Active
Application number
CN201910033571.8A
Other languages
Chinese (zh)
Other versions
CN109801239A (en
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.)
Yangtze Delta Region Institute of Tsinghua University Zhejiang
Original Assignee
Zhejiang Future Technology Institute (jiaxing)
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 Zhejiang Future Technology Institute (jiaxing) filed Critical Zhejiang Future Technology Institute (jiaxing)
Priority to CN201910033571.8A priority Critical patent/CN109801239B/en
Publication of CN109801239A publication Critical patent/CN109801239A/en
Application granted granted Critical
Publication of CN109801239B publication Critical patent/CN109801239B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a method and a device for eliminating a highlight area of a microsurgical image, belonging to the technical field of image processing, wherein the method comprises the following steps: extracting color characteristics of a highlight region from an image to be processed, and establishing a highlight region pixel model; generating a highlight mask image according to the highlight region pixel model; extracting edges in the highlight mask image; acquiring a contour line cluster of a highlight area of the highlight mask image in an iterative processing mode; and performing image restoration on the pixels at the contour line cluster of the highlight area to obtain a restored image. Therefore, highlight in the stereoscopic microsurgery image is eliminated, the problem that the surgical picture is influenced by mirror reflection is solved, and visual fatigue caused by the highlight is avoided.

Description

Method and device for eliminating highlight area of microsurgery image
Technical Field
The embodiment of the invention relates to the technical field of image processing, in particular to a method and a device for eliminating a highlight area of a microsurgical image.
Background
Microsurgical techniques utilize high precision surgical microscopes and necessary ancillary equipment to perform extremely precise surgical procedures on surgical sites. The surgeon performs the operation under the operation microscope by means of the amplification of the operation microscope, tissues are amplified, and not only can see the fine tissues which are not clearly seen by the eyes in the operation field, but also have stereoscopic impression, so that the surgeon is facilitated to accurately dissect, cut and suture various tissues, and then fine microsurgical instruments and suture materials are used to complete fine operations on the fine tissues.
Microsurgery is currently widely used in many clinical surgical departments, such as brain, ophthalmology, otorhinolaryngology, orthopaedics, and others. With the development of video imaging technology, imaging systems based on surgical microscopes have been gradually popularized and applied in recent years. The operation microscopic image system can acquire the operation picture in the microscope in real time and display the operation picture in the digital monitor. Different from the traditional optical imaging, the anatomical structure is clearer and easier to identify under a digital monitor, which is very helpful for doctors to perceive the anatomical structure of the operation area.
The inventor finds that the surgical area generally has more specular reflection, which seriously affects the presentation of a surgical picture, affects the observation of the anatomical structure of the surgical area, and is easy to cause eye fatigue and other problems.
Disclosure of Invention
Therefore, the embodiment of the invention provides a method and a device for eliminating a highlight area of a microsurgical image, so as to solve the problems that the appearance of a surgical picture is influenced due to mirror reflection, the observation of an anatomical structure of a surgical area is influenced, and eye fatigue is easily caused in the prior art.
In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
in a first aspect of an embodiment of the present invention, there is provided a method of highlight region elimination of a microsurgical image, comprising:
extracting color characteristics of a highlight region from an image to be processed, and establishing a highlight region pixel model;
generating a highlight mask image according to the highlight region pixel model;
extracting the edge of the highlight mask image;
obtaining a highlight mask image contour line cluster of the highlight mask image by adopting an iterative processing mode for the edge;
and carrying out image restoration on the contour line clusters of the high photomask image to obtain a restored image.
In another embodiment of the present invention, the extracting highlight color features from the image to be processed and establishing a highlight pixel model includes:
and (3) a highlight area is marked in the image to be processed, pixel color characteristics are extracted from the highlight area, a Gaussian model of the color characteristics is established, and the Gaussian model is used as a highlight area pixel model.
In another embodiment of the present invention, the generating a highlight mask image according to the highlight region pixel model includes:
generating a single-channel binary image with the same size as the image to be processed, taking the single-channel binary image as a highlight mask image, calculating the probability that each pixel in the image to be processed is a highlight area pixel, judging the calculated probability, and setting the corresponding pixel in the highlight mask image as 1 under the condition that the calculated probability is greater than a preset value; and under the condition that the pixel value is less than or equal to the preset value, setting the corresponding pixel in the highlight mask image as 0.
In another embodiment of the present invention, the obtaining the contour line of the highlight mask image by using an iterative processing manner for the edge includes:
and judging each pixel value in the same edge pixel layer, and taking the pixel coordinate as the pixel of the next edge pixel layer to obtain the contour line cluster of each edge pixel layer under the condition that the mask value of the pixels in the four neighborhoods of the edge pixels is judged to be 1.
In another embodiment of the present invention, the image repairing the contour cluster of the high photomask image to obtain a repaired image includes:
according to the high photomask image contour line cluster, taking a region in the edge range of the high photomask image as a region to be repaired, obtaining the edge of the region to be repaired line cluster, calculating the gradient value of adjacent point contour line cluster for each pixel point on the edge of the region to be repaired line cluster, calculating the distance weight according to the gradient value of adjacent point contour line cluster and the layer number index of the corresponding contour line cluster, calculating the new pixel value corresponding to the pixel point according to the distance weight, and obtaining the repaired image according to the new pixel value corresponding to each pixel point on the edge of the region to be repaired line cluster.
In a second aspect of the present invention, there is provided a highlight region removal apparatus for a microsurgical image, comprising:
the modeling module is used for extracting the color characteristics of the highlight area from the image to be processed and establishing a highlight area pixel model;
the mask image generation module is used for generating a highlight mask image according to the highlight region pixel model;
the edge extraction module is used for extracting the edge of the high photomask image;
the contour line generation module is used for acquiring a highlight mask image contour line cluster of the highlight mask image in an iterative processing mode on the edge;
and the image restoration module is used for restoring the contour line clusters of the high photomask image to obtain a restored image.
In another embodiment of the present invention, the modeling module is configured to mark a highlight region in the image to be processed, extract pixel color features for the highlight region, and establish a gaussian model of the color features, which is used as a highlight region pixel model.
In another embodiment of the present invention, the mask image generating module is configured to generate a binary image with a single channel having the same size as the to-be-processed image, use the binary image as a highlight mask image, calculate a probability that each pixel in the to-be-processed image is a highlight region pixel, determine the calculated probability, and set a corresponding pixel in the highlight mask image to be 1 if the calculated probability is greater than a preset value; and under the condition that the pixel value is less than or equal to the preset value, setting the corresponding pixel in the highlight mask image as 0.
In another embodiment of the present invention, the contour line generation module is configured to determine each pixel value in the same edge pixel layer, and in a case that the mask value of the pixel in the four neighborhoods of the edge pixel is determined to be 1, use the pixel coordinate as the pixel of the next edge pixel layer to obtain the contour line cluster of each edge pixel layer.
In a third aspect of embodiments of the present invention, there is provided a computer-readable storage medium storing a program for implementing the highlight region removal method of a microsurgical image as described above. .
According to the embodiment of the invention, the following advantages are provided:
the method comprises the steps of establishing a highlight region pixel model for a highlight region by extracting color features of a highlight part, calculating the probability of each pixel being a highlight region pixel based on the model, determining the highlight region pixel, extracting the edge of a communicated region, namely the edge of a highlight mask image, according to the fact that the highlight region presents regionalization and has mutually communicated geometric features, and calculating the contour cluster of the highlight mask image in an iterative mode for the edge. And pixel restoration is carried out on each pixel point based on the contour line cluster, so that highlight in the stereoscopic microsurgery image is eliminated, the problem that the surgical picture is presented due to mirror reflection is fundamentally solved, and visual fatigue caused by the highlight is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It should be apparent that the drawings in the following description are merely exemplary, and that other embodiments can be derived from the drawings provided by those of ordinary skill in the art without inventive effort.
FIG. 1 is a flowchart of a method for highlight region elimination of a microsurgical image according to an embodiment of the present invention;
FIG. 2 is a schematic view of a high-light region eliminating device for a microsurgical image according to another embodiment of the invention;
in the figure: 301 is a modeling module, 302 is a mask image generation module, 303 is an edge extraction module, 304 is a contour generation module, and 305 is an image inpainting module.
Detailed Description
The present invention is described in terms of particular embodiments, other advantages and benefits of the present invention will become apparent to those skilled in the art from the following disclosure, and it is understood that the described embodiments are a subset of the embodiments of the present invention, and not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In a first aspect of the present invention, there is provided a method for removing highlight regions from a microsurgical image, as shown in fig. 1, comprising:
step 101: and extracting the color characteristics of the highlight region from the image to be processed, and establishing a highlight region pixel model.
In the embodiment of the invention, a sample image of an operation area is obtained and used as an image to be processed, a highlight area is defined in the image to be processed, pixel color characteristics are extracted from the highlight area, and a Gaussian model of the color characteristics is established. The method specifically comprises the following steps: the average value of all pixels in the highlight region is counted, wherein mu is the average value of all pixels in the highlight region, piIs an i-point pixel.
Figure BDA0001945096970000051
Calculating the variance of all pixels in the highlight region according to the average value of all pixels in the highlight region, wherein the variance value is C,
Figure BDA0001945096970000052
and calculating a highlight area pixel model according to the variance of all pixels in the highlight area, wherein n is the number of pixel channels, and n is 3 in the invention.
Figure BDA0001945096970000053
Step 102: generating a highlight mask image according to the highlight area pixel model;
in the embodiment of the invention, a single-channel binary image with the same size as the image to be processed is generated and is used as a high photomask image. Specifically, the probability that each pixel in the image to be processed is a highlight region pixel is calculated, the calculated probability is judged, a corresponding pixel in the highlight mask image is set according to the judgment result, specifically, the value of the pixel x in the image to be processed is substituted into a highlight region pixel model, and the probability P (x) that the pixel x is a highlight region pixel is calculated. Judging the probability P (x) that each pixel x is a highlight area pixel, and under the condition that the probability P (x) is greater than a preset value, judging that the pixel point is a highlight area pixel, and setting the corresponding pixel of the corresponding highlight mask image as 1; and under the condition that the pixel point is less than or equal to the preset value, judging that the pixel point is a non-highlight area pixel, and setting the corresponding pixel of the corresponding highlight mask image as 0 so as to obtain each pixel of the highlight mask image.
Step 103: extracting the edge of the highlight mask image;
in the embodiment of the invention, the edge of the communication area is extracted from the highlight mask image and is taken as the edge of the highlight mask image. Obtaining a region to be repaired, and recording the region to be repaired as omega, and recording the edge of the region to be repaired as omega
Figure BDA0001945096970000061
Let us note that the current edge is the first layer and its distance T to the outermost edge has a value of 0.
Furthermore, before the edge of the highlight mask image is extracted, a filtering algorithm is adopted for the highlight mask image to remove salt and pepper noise and burrs in the image, and then the interference of the noise on the edge of the highlight mask image is reduced. Wherein, the filtering algorithm may be an on operation.
Step 104: obtaining the contour line of the highlight mask image by adopting an iterative processing mode on the edge;
in the embodiment of the present invention, the extracting the contour line cluster L of the highlight mask image specifically may adopt an iterative processing method, including:
1) traversing edge pixel L of highlight area of current highlight mask imagenLayer, judging whether the mask value of four adjacent pixels of edge pixel is 1, if so, recording the pixel coordinate as Ln+1The pixels of the layer.
2) Traverse edge pixel LnAll pixel values up to LnAll traversal of the layer pixels is finished, so that all L is obtainedn+1Layer pixels.
3) Will Ln+1Taking the layer as the current layer, repeating the steps 1) to 2), and obtaining a new edge pixel layer Ln+2
4) Continuously repeating the processes 1) to 3) until all the pixels are classified into a specific edge pixel layer to finally obtain L0,L1,L2,…,LNThe contours of the layers are clustered.
Step 105: performing image restoration on the image to be processed according to the contour line of the highlight mask image to obtain a restored image;
in the embodiment of the invention, any point p of the edge of a line cluster in a region to be repaired is obtained, and the gradient value of the contour cluster of adjacent points of the point p is calculated by the following specific algorithm:
gx=abs(N(i+1,j)-N(i,j))
gy=abs(N(i,j+1)-N(i,j))
Figure BDA0001945096970000071
wherein the p coordinate point is (i, j),
Figure BDA0001945096970000072
representing the cluster gradient values of the contours of the p dots.
Calculating the distance weight of the p point and the q point according to the gradient value of the contour cluster of the adjacent points of the p point and the layer number index of the contour cluster of the p point, wherein the method comprises the following steps:
Figure BDA0001945096970000073
wherein q is a point on the edge of the line cluster of the region to be repaired, w (p, q) is the distance weight between the point p and the point q, and N (p) represents the layer number index of the contour line cluster of the pixel p.
Calculating a new pixel value corresponding to the edge point p of the line cluster of the region to be repaired according to the point p, the point q and the distance weight w (p, q) of the point p and the point q, wherein the specific method comprises the following steps:
and traversing the pixels of each line cluster from small to large according to the index of the number of the line cluster layers. For the line cluster edge point p of the area to be repaired, a new pixel value is obtained by the following formula
Figure BDA0001945096970000074
Where B represents a neighborhood set of p points, p represents a point in the neighborhood set, and w (p, q) represents a distance weight of point p and point q.
And sequentially taking out each pixel from the list L according to the index, calculating each pixel to obtain I (p), namely generating a corresponding new pixel until the element in the list L is empty, and repairing the pixel.
In the embodiment of the invention, a highlight region pixel model is established for a highlight region by extracting the color characteristics of the highlight part, the probability that each pixel is a highlight region pixel is calculated based on the model, the highlight region pixel is determined, the edge of a communicated region, namely the edge of a highlight mask image, is extracted according to the fact that the highlight region presents regionalization and has mutually communicated geometric characteristics, and the contour cluster of the highlight mask image is calculated by adopting an iterative processing mode for the edge. And carrying out pixel restoration on each pixel point based on the contour line cluster, thereby eliminating highlight in the stereoscopic microsurgery image.
In a second aspect of the present invention, there is provided a highlight region removal apparatus for a microsurgical image, as shown in fig. 2, comprising:
the modeling module 301 is configured to extract color features of a highlight region from an image to be processed, and establish a highlight region pixel model.
In the embodiment of the present invention, the modeling module 301 is configured to obtain a sample image of an operation area, use the sample image as a to-be-processed image, mark a highlight area in the to-be-processed image, extract pixel color features for the highlight area, and establish a gaussian model of the color features. The method specifically comprises the following steps: the average value of all pixels in the highlight region is counted, wherein mu is the average value of all pixels in the highlight region, piIs an i-point pixel.
Figure BDA0001945096970000081
Calculating the variance of all pixels in the highlight region according to the average value of all pixels in the highlight region, wherein the variance value is C,
Figure BDA0001945096970000082
and calculating a highlight area pixel model according to the variance of all pixels in the highlight area, wherein n is the number of pixel channels, and n is 3 in the invention.
Figure BDA0001945096970000083
A mask image generation module 302, configured to generate a highlight mask image according to the highlight region pixel model;
in this embodiment of the present invention, the mask image generating module 302 is configured to generate a single-channel binary image having the same size as the image to be processed, and use the single-channel binary image as a highlight mask image. Calculating the probability that each pixel in the image to be processed is a highlight region pixel, judging the calculated probability, setting a corresponding pixel in the highlight mask image according to a judgment result, specifically substituting the value of a pixel x in the image to be processed into a highlight region pixel model, and calculating the probability P (x) that the pixel x is the highlight region pixel. Judging the probability P (x) that each pixel x is a highlight area pixel, and under the condition that the probability P (x) is greater than a preset value, judging that the pixel point is a highlight area pixel, and setting the corresponding pixel of the corresponding highlight mask image as 1; and under the condition that the pixel point is less than or equal to the preset value, judging that the pixel point is a non-highlight area pixel, and setting the corresponding pixel of the corresponding highlight mask image as 0 so as to obtain each pixel of the highlight mask image.
An edge extraction module 303, configured to extract an edge of the high photomask image;
in this embodiment of the present invention, the edge extracting module 303 is configured to extract an edge of the connected region from the high photomask image, and use the edge as the heightEdges of the photomask image. Obtaining a region to be repaired, recording the region to be repaired as omega, and recording the edge of the region to be repaired as omega
Figure BDA0001945096970000091
Note that the current edge is the first layer, and the distance T from the outermost edge has a value of 0.
The contour line generation module 304 is configured to obtain a highlight mask image contour line of the highlight mask image in an edge iteration processing manner;
in this embodiment of the present invention, the contour generating module 304 is specifically configured to extract a contour cluster L of a highlight mask image by using an iterative edge method, and includes:
1) traversing the edge pixel L of the highlight region of the current highlight mask imagenLayer, judging whether the mask value of four adjacent pixel of edge pixel is 1, if so, recording the pixel coordinate as Ln+1The pixels of the layer.
2) Traverse edge pixel LnUp to LnAll traversal of the layer pixels is finished, so that all L is obtainedn+1Layer pixels.
3) Mixing L withn+1Taking the layer as the current layer, repeating the steps 1) to 2) to obtain a new edge pixel layer Ln+2
4) Continuously repeating the processes 1) to 3) until all the pixels are classified into a specific edge pixel layer to finally obtain L0,L1,L2,…,LNThe contours of the layers are clustered.
The image restoration module 305 is configured to perform image restoration according to the contour lines of the high photomask image to obtain a restored image;
in the embodiment of the invention, any point p of the edge of a line cluster in a region to be repaired is obtained, and the gradient value of the contour cluster of adjacent points of the point p is calculated by the following specific algorithm:
gx=abs(N(i+1,j)-N(i,j))
gy=abs(N(i,j+1)-N(i,j))
Figure BDA0001945096970000101
wherein the p coordinate point is (i, j),
Figure BDA0001945096970000102
representing the cluster gradient values of the contours of the p dots.
Calculating the distance weight of the p point and the q point according to the gradient value of the contour cluster of the adjacent points of the p point and the layer number index of the contour cluster of the p point, wherein the method comprises the following steps:
Figure BDA0001945096970000103
wherein q is a point on the edge of the line cluster of the region to be repaired, w (p, q) is the distance weight between the point p and the point q, and N (p) represents the layer number index of the contour line cluster of the pixel p.
Calculating a new pixel value corresponding to the edge point p of the line cluster of the region to be repaired according to the point p, the point q and the distance weight w (p, q) of the point p and the point q, wherein the specific method comprises the following steps:
and traversing pixels at the corresponding line cluster coordinates in each original image to be processed from small to large according to the index of the line cluster layer number. For the line cluster edge point p of the area to be repaired, a new pixel value is obtained by the following formula
Figure BDA0001945096970000104
Where B represents a neighborhood set of p points, p represents a point in the neighborhood set, and w (p, q) represents a distance weight of the point p and the point q.
And sequentially taking out each pixel from the list L according to the index, calculating each pixel to obtain I (p), namely generating a corresponding new pixel until the element in the list L is empty, and repairing the pixel.
In the embodiment of the invention, a highlight region pixel model is established for a highlight region by extracting the color characteristics of the highlight part, the probability that each pixel is a highlight region pixel is calculated based on the model, the highlight region pixel is determined, the edge of a communicated region, namely the edge of a highlight mask image, is extracted according to the fact that the highlight region presents regionalization and has mutually communicated geometric characteristics, and the contour cluster of the highlight mask image is calculated in an iterative mode for the edge. And then, pixel restoration is carried out on each pixel point based on the contour line cluster, so that highlight in the stereoscopic microsurgery image is eliminated.
In a third aspect of the present invention, there is provided a computer-readable storage medium storing a program for implementing a highlight region removal method of a microsurgical image.
Although the invention has been described in detail above with reference to a general description and specific examples, it will be apparent to one skilled in the art that modifications or improvements may be made thereto based on the invention. Accordingly, such modifications and improvements are intended to be within the scope of the invention as claimed.

Claims (9)

1. A method for eliminating highlight areas of a microsurgical image, comprising:
extracting color characteristics of a highlight region from an image to be processed, and establishing a highlight region pixel model;
generating a highlight mask image according to the highlight region pixel model;
extracting the edge of the highlight mask image;
obtaining a highlight mask image contour line cluster of the highlight mask image by adopting an iterative processing mode for the edge; wherein, adopting the mode of iterative processing, obtaining contour line cluster L of high photomask image includes:
1) traversing the edge pixel L of the highlight region of the current highlight mask imagenLayer, judging whether the mask value of four adjacent pixel of edge pixel is 1, if so, recording the pixel coordinate as Ln+1A pixel of a layer;
2) traverse edge pixel LnAll pixel values up to LnAll traversal of the layer pixels is finished, so that all L is obtainedn+1Layer pixels;
3) mixing L withn+1Taking the layer as the current layer, repeating the steps 1) to 2) to obtain a new edge pixel layer Ln+2
4) Continuously repeating the processes 1) to 3) until all the pixels are classified into a specific edge pixel layer to finally obtain L0,L1,L2,...,LNA cluster of contour lines of the layer;
performing image restoration on pixels corresponding to the contour cluster positions of the high photomask image in the image to be processed to obtain a restored image;
according to the highlight mask image contour line cluster, taking a region in the edge range of the highlight mask image as a region to be repaired, obtaining the line cluster edge of the region to be repaired, calculating a contour gradient value of adjacent points for each pixel point on the line cluster edge of the region to be repaired, calculating a distance weight according to the contour gradient value of the adjacent points and a layer number index of the corresponding contour line cluster, calculating a new pixel value corresponding to the pixel point according to the distance weight, and obtaining a repaired image according to the new pixel value corresponding to each pixel point on the line cluster edge of the region to be repaired;
specifically, any point p of a cluster edge of the region to be repaired is obtained, and a contour cluster gradient value of adjacent points of the p point is calculated, wherein the specific algorithm is as follows:
gx=abs(N(i+1,j)-N(i,j))
gy=abs(N(i,j+1)-N(i,j))
Figure FDA0003594955560000021
wherein the p coordinate point is (i, j),
Figure FDA0003594955560000022
representing the gradient value of contour line cluster of adjacent points of the p points;
calculating the distance weight of the p point and the q point according to the gradient value of the contour cluster of the adjacent points of the p point and the layer number index of the contour cluster of the p point, wherein the method comprises the following steps:
Figure FDA0003594955560000023
wherein q is a point on the edge of a line cluster of the region to be repaired, w (p, q) is the distance weight between the point p and the point q, and N (p) represents the layer number index of the contour line cluster of the pixel p;
calculating a new pixel value corresponding to the edge point p of the line cluster of the region to be repaired according to the point p, the point q and the distance weight w (p, q) of the point p and the point q, wherein the specific method comprises the following steps:
traversing pixels of each line cluster from small to large according to the index of the number of the line cluster layers; for the line cluster edge point p of the area to be repaired, a new pixel value is obtained by the following formula
Figure FDA0003594955560000024
B represents a neighborhood set of p points, p represents a point in the neighborhood set, and w (p, q) represents the distance weight of the point p and the point q;
and sequentially taking out each pixel from the list L according to the index, calculating each pixel to obtain I (p), namely generating a corresponding new pixel until the element in the list L is empty, and repairing the pixel.
2. The method of claim 1, wherein extracting highlight region color features from the image to be processed and establishing a highlight region pixel model comprises:
and (3) a highlight area is marked in the image to be processed, pixel color characteristics are extracted from the highlight area, a Gaussian model of the color characteristics is established, and the Gaussian model is used as a highlight area pixel model.
3. The method of claim 1, wherein generating a highlight mask image from the highlight region pixel model comprises:
generating a single-channel binary image with the same size as the image to be processed, taking the single-channel binary image as a highlight mask image, calculating the probability that each pixel in the image to be processed is a highlight region pixel, judging the calculated probability, and setting the corresponding pixel in the highlight mask image to be 1 under the condition that the calculated probability is greater than a preset value; and under the condition that the pixel value is less than or equal to the preset value, setting the corresponding pixel in the highlight mask image as 0.
4. The method of claim 1, wherein iteratively processing the edge to obtain the highlight mask image contour comprises:
and judging each pixel value in the same edge pixel layer, and taking the pixel coordinate as the pixel of the next edge pixel layer to obtain the contour line cluster of each edge pixel layer under the condition that the mask value of the pixels in the four neighborhoods of the edge pixels is judged to be 1.
5. A device for removing highlight regions from a microsurgical image, comprising:
the modeling module is used for extracting the color characteristics of the highlight area from the image to be processed and establishing a highlight area pixel model;
the mask image generation module is used for generating a highlight mask image according to the highlight area pixel model;
the edge extraction module is used for extracting the edge of the high photomask image;
the contour line generation module is used for acquiring a highlight mask image contour line cluster of the highlight mask image in an iterative processing mode on the edge; wherein, adopting the mode of iterative processing, obtaining contour line cluster L of high photomask image includes:
1) traversing the edge pixel L of the highlight region of the current highlight mask imagenLayer, judging whether the mask value of four adjacent pixel of edge pixel is 1, if so, recording the pixel coordinate as Ln+1A pixel of a layer;
2) traverse edge pixel LnAll pixel values up to LnAll traversal of the layer pixels is finished, so that all L is obtainedn+1Layer pixels;
3) mixing L withn+1Taking the layer as the current layer, repeating the steps 1) to 2), and obtaining a new edge pixel layer Ln+2
4) Continuously repeating the processes 1) to 3) until all the pixels are classified into a specific edge pixel layer to finally obtain L0,L1,L2,...,LNA cluster of contour lines of the layer;
the image restoration module is used for restoring the image of the pixels corresponding to the contour cluster positions of the high photomask image in the image to be processed to obtain a restored image;
according to the high photomask image contour line cluster, taking a region in the edge range of the high photomask image as a region to be repaired, obtaining a line cluster edge of the region to be repaired, calculating a gradient value of a contour line cluster of adjacent points for each pixel point on the line cluster edge of the region to be repaired, calculating a distance weight according to the gradient value of the contour line cluster of the adjacent points and a layer number index of the corresponding contour line cluster, calculating a new pixel value corresponding to the pixel point according to the distance weight, and obtaining a repaired image according to the new pixel value corresponding to each pixel point on the line cluster edge of the region to be repaired;
specifically, any point p of a cluster edge of the region to be repaired is obtained, and a contour cluster gradient value of adjacent points of the p point is calculated, wherein the specific algorithm is as follows:
gx=abs(N(i+1,j)-N(i,j))
gy=abs(N(i,j+1)-N(i,j))
Figure FDA0003594955560000041
wherein the p coordinate point is (i, j),
Figure FDA0003594955560000042
representing the gradient value of contour line cluster of adjacent points of the p points;
calculating the distance weight of the p point and the q point according to the gradient value of the contour cluster of the adjacent points of the p point and the layer number index of the contour cluster of the p point, wherein the method comprises the following steps:
Figure FDA0003594955560000043
wherein q is a point on the edge of a line cluster of the region to be repaired, w (p, q) is the distance weight between the point p and the point q, and N (p) represents the layer number index of the contour line cluster of the pixel p;
calculating a new pixel value corresponding to the edge point p of the line cluster of the region to be repaired according to the point p, the point q and the distance weight w (p, q) of the point p and the point q, wherein the specific method comprises the following steps:
traversing pixels of each line cluster from small to large according to the index of the number of the line cluster layers; for the line cluster edge point p of the area to be repaired, a new pixel value is obtained by the following formula
Figure FDA0003594955560000051
B represents a neighborhood set of p points, p represents a point in the neighborhood set, and w (p, q) represents the distance weight of the point p and the point q;
and sequentially taking out each pixel from the list L according to the index, calculating each pixel to obtain I (p), namely generating a corresponding new pixel until the element in the list L is empty, and repairing the pixel.
6. The apparatus of claim 5,
the modeling module is used for marking a highlight area in the image to be processed, extracting pixel color characteristics of the highlight area, establishing a Gaussian model of the color characteristics, and taking the Gaussian model as a highlight area pixel model.
7. The apparatus of claim 5,
the mask image generation module is used for generating a binary image with the same size and a single channel as the to-be-processed image, taking the binary image as a highlight mask image, calculating the probability that each pixel in the to-be-processed image is a highlight region pixel, judging the calculated probability, and setting the corresponding pixel in the highlight mask image to be 1 under the condition that the calculated probability is greater than a preset value; and under the condition that the pixel value is less than or equal to the preset value, setting the corresponding pixel in the highlight mask image as 0.
8. The apparatus of claim 5,
and the contour line generation module is used for judging each pixel value in the same edge pixel layer, and taking the pixel coordinate as the pixel of the next edge pixel layer to obtain the contour line cluster of each edge pixel layer under the condition that the mask value of the pixels in the four neighborhoods of the edge pixels is judged to be 1.
9. A computer-readable storage medium characterized in that the computer-readable storage medium stores a program for implementing the highlight region elimination method of a microsurgical image according to any one of claims 1 to 4.
CN201910033571.8A 2019-01-14 2019-01-14 Method and device for eliminating highlight area of microsurgery image Active CN109801239B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910033571.8A CN109801239B (en) 2019-01-14 2019-01-14 Method and device for eliminating highlight area of microsurgery image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910033571.8A CN109801239B (en) 2019-01-14 2019-01-14 Method and device for eliminating highlight area of microsurgery image

Publications (2)

Publication Number Publication Date
CN109801239A CN109801239A (en) 2019-05-24
CN109801239B true CN109801239B (en) 2022-06-17

Family

ID=66558760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910033571.8A Active CN109801239B (en) 2019-01-14 2019-01-14 Method and device for eliminating highlight area of microsurgery image

Country Status (1)

Country Link
CN (1) CN109801239B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110866873A (en) * 2019-10-18 2020-03-06 北京航空航天大学 Highlight elimination method and device for endoscope image
CN111311561B (en) * 2020-02-10 2023-10-10 浙江未来技术研究院(嘉兴) Automatic operation area photometry method and device based on microsurgery imaging system
CN112581394A (en) * 2020-12-16 2021-03-30 维沃移动通信有限公司 Image processing method, apparatus, device and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105957042A (en) * 2016-06-07 2016-09-21 北京理工大学 Highlight region eliminating method of endoscopic image
CN106650794A (en) * 2016-11-24 2017-05-10 北京理工大学 Method and system for eliminating highlight of image affected by highlight reflection on object surface
CN108122212A (en) * 2017-12-21 2018-06-05 北京小米移动软件有限公司 Image repair method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4396387B2 (en) * 2004-05-13 2010-01-13 オムロン株式会社 Image correction device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105957042A (en) * 2016-06-07 2016-09-21 北京理工大学 Highlight region eliminating method of endoscopic image
CN106650794A (en) * 2016-11-24 2017-05-10 北京理工大学 Method and system for eliminating highlight of image affected by highlight reflection on object surface
CN108122212A (en) * 2017-12-21 2018-06-05 北京小米移动软件有限公司 Image repair method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Explicit feature mapping via multi-layer perceptron and its application to Mine-Like Objects detection;Hang Shao et al.;《2014 International Joint Conference on Neural Networks (IJCNN)》;20140904;全文 *
MASK在遥感影像水系提取中的应用;桂新等;《测绘通报》;20150925(第09期);全文 *
无人船监视图像反光区域检测与去除方法及实验验证;时俊楠等;《海洋科学》;20180115(第01期);全文 *

Also Published As

Publication number Publication date
CN109801239A (en) 2019-05-24

Similar Documents

Publication Publication Date Title
CN109801239B (en) Method and device for eliminating highlight area of microsurgery image
US10168526B2 (en) Cell contour formation apparatus and method of the same, and non-transitory computer readable storage medium storing a cell contour formation program
CN104463161B (en) The color document images segmentation repaired using automated graphics and binaryzation
US8958621B2 (en) Corneal graft evaluation based on optical coherence tomography image
JP7117914B2 (en) Image processing device, image processing method, and program
CN110782434B (en) Brain tuberculosis MRI image focus intelligent marking and positioning device
CN109493943B (en) Three-dimensional visual scalp craniotomy positioning method combined with optical surgical navigation
CN102750538A (en) Go competition result analysis method based on image processing technique
JP2008220617A (en) Image analysis system and program
Barman et al. MRI image segmentation using level set method and implement an medical diagnosis system
WO2015115499A1 (en) Tool inspection method and tool inspection device
CN113012249B (en) Method, device and storage medium for generating focus on CT image
CN113256673A (en) Intelligent wrinkle removing system based on infrared laser
CN111192208B (en) Tooth CR image enhancement method and device based on side window filter
CN111951196A (en) Progressive point cloud down-sampling method and device based on graph
CN108682024B (en) Image definition matching method and system
CN110443765A (en) Image processing method, device and electronic equipment
CN114742725A (en) Image processing method, image processing device, electronic equipment and storage medium
CN113496470A (en) Image processing method and device, electronic equipment and storage medium
CN109919881B (en) Leopard print removing method based on leopard print-shaped fundus image and related equipment
CN112581411B (en) Image defogging method and terminal
CN112465724B (en) Chromatic aberration correction method based on prior information of cross channel of shear wave domain
Bier et al. Band-pass filter design by segmentation in frequency domain for detection of epithelial cells in endomicroscope images
CN117710250B (en) Method for eliminating honeycomb structure imaged by fiberscope
Li et al. Chromatic aberration correction using cross-channel prior in shearlet domain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240311

Address after: 314050 9F, No. 705, Asia Pacific Road, Nanhu District, Jiaxing City, Zhejiang Province

Patentee after: ZHEJIANG YANGTZE DELTA REGION INSTITUTE OF TSINGHUA University

Country or region after: China

Address before: No.152 Huixin Road, Nanhu District, Jiaxing City, Zhejiang Province 314000

Patentee before: ZHEJIANG FUTURE TECHNOLOGY INSTITUTE (JIAXING)

Country or region before: China