Summary of the invention
Defect and deficiency based on the above-mentioned prior art, the present invention propose a kind of method and device for identifying image difference,
It can be realized automatically identification medical image difference.
A method of identification image difference, comprising:
Obtain the first image and the second image of difference to be identified;
The character pixel point set of the first image and second image is obtained respectively;
The character pixel point set of character pixel point set and second image to the first image matches
Processing, determines the coordinate of the matched pixel point of the first image and second image;
According to the coordinate of the first image and the matched pixel point of second image, the first image is calculated
With the error image of second image;
According to the error image, the differential image region of the first image and second image is determined.
Optionally, first image and the second image for obtaining difference to be identified, comprising:
Obtain the first image and preset contrast images set;Wherein, the image in the contrast images set with it is described
The imageable target of first image is identical;
The feature pixel for extracting the first image and every piece image in the contrast images set respectively, obtains
The character pixel point set of the character pixel point set of the first image and every piece image in the contrast images set
It closes;
Respectively by every piece image in the character pixel point set of the first image and the contrast images set
Character pixel point set is matched, and the matching characteristic pixel with the first image is selected from the contrast images set
The most image of point, as the second image.
Optionally, described according to the first image and the coordinate of the matched pixel point of second image, it is calculated
The error image of the first image and second image, comprising:
According to the coordinate of the first image and the matched pixel point of second image, the first image or institute are calculated
State the transformation matrix of the second image;
According to the transformation matrix, the first image and second image are converted to and are shown in same coordinate position
Image;
The difference of the first image and the second image that show in same position is calculated, and carries out pixel normalized, is obtained
To the error image of the first image and second image.
Optionally, described according to the error image, determine the differential image of the first image and second image
Region, comprising:
The error image is inputted into trained convolutional neural networks, the convolutional neural networks reasoning is made to obtain institute
State the mask figure of error image;Wherein, the mask figure includes effective difference content of the error image;
Connected component labeling processing is carried out to the mask figure, determines the disparity map of the first image and second image
As region.
Optionally, the method also includes:
The processing of profile trace is carried out to the differential image region, obtains the profile in the differential image region;
Calculate and export the area and diameter in the differential image region.
A kind of device identifying image difference, comprising:
Image acquisition unit, for obtaining the first image and the second image of difference to be identified;
Feature pixel acquiring unit, for obtaining the feature pixel of the first image and second image respectively
Set;
Matching treatment unit, the feature picture for character pixel point set and second image to the first image
Vegetarian refreshments set carries out matching treatment, determines the coordinate of the matched pixel point of the first image and second image;
Difference computational unit, for the coordinate according to the first image and the matched pixel point of second image, meter
Calculation obtains the error image of the first image and second image;
Differential image determination unit, for determining the first image and second image according to the error image
Differential image region.
Optionally, described image acquiring unit, comprising:
First acquisition unit, for obtaining the first image and preset contrast images set;Wherein, the comparison diagram image set
Image in conjunction is identical as the imageable target of the first image;
Feature pixel extraction unit, it is each in the first image and the contrast images set for extracting respectively
The feature pixel of width image obtains in the character pixel point set and the contrast images set of the first image
The character pixel point set of every piece image;
Image selection unit, for respectively by the character pixel point set of the first image and the contrast images set
In the character pixel point set of every piece image matched, selected from the contrast images set and first figure
The most image of the matching characteristic pixel of picture, as the second image.
Optionally, the difference computational unit, comprising:
First computing unit, for the coordinate according to the first image and the matched pixel point of second image, meter
Calculate the transformation matrix of the first image or second image;
Image conversion unit, for according to the transformation matrix, the first image and second image to be converted to
In the image that same coordinate position is shown;
Second computing unit for calculating the difference of the first image and the second image that show in same position, and carries out
Pixel normalized obtains the error image of the first image and second image.
Optionally, the differential image determination unit, comprising:
Image reasoning element makes the convolution for the error image to be inputted trained convolutional neural networks
ANN Reasoning obtains the mask figure of the error image;Wherein, the mask figure includes the effective poor of the error image
Different content;
Processing unit is marked, for carrying out connected component labeling processing to the mask figure, determines the first image and institute
State the differential image region of the second image.
Optionally, described device further include:
Output unit obtains the differential image region for carrying out the processing of profile trace to the differential image region
Profile;Calculate and export the area and diameter in the differential image region.
Technical solution of the present invention obtains described the after the first image and the second image for obtaining difference to be identified respectively
The character pixel point set of one image and second image;Then to the character pixel point set of the first image and described
The character pixel point set of second image carries out matching treatment, determines the matched pixel of the first image and second image
The coordinate of point, and according to the coordinate of the first image and the matched pixel point of second image is calculated described the
The error image of one image and second image;Finally according to the error image, the first image and described are determined
The differential image region of two images.Above-mentioned technical proposal realizes the differential image region of the identification two images of automation, i.e.,
The identification image difference for realizing automation, applies it in medical image difference identification, than doctor's naked eyes identification medicine figure
Faster, recognition efficiency is higher for the different speed of aberration.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
It is shown in Figure 1 the embodiment of the invention discloses a kind of method for identifying image difference, this method comprises:
S101, the first image and the second image for obtaining difference to be identified;
Specifically, above-mentioned the first image and the second image, refer respectively to different times during patient assessment and are directed to
The medical image of same physical feeling shooting.Such as above-mentioned first image is that patient claps at current time for a certain physical feeling
The medical image taken the photograph, above-mentioned second image are the medical image that patient shoots in medical history for same physical feeling, can
To understand, two images are compared into Recognition Different, so that it may judge whether the above-mentioned same physical feeling of the patient occurs
Variation, for example whether generation lesion or institutional framework change.
Technical solution of the embodiment of the present invention can be realized in a software form, realize the soft of technical solution of the embodiment of the present invention
When part is run, the first image of above-mentioned acquisition difference to be identified and the process of the second image can be and provide image library for user
Image selection window makes user select to need the image of Recognition Different from image library, while image display window is arranged, simultaneously
Show the image for needing Recognition Different of user's selection.Further, user is also an option that multiple image carries out difference knowledge
Not, such as doctor is from the medical image document library of the history of same patient, and selection is cured for several history of same physical feeling
Image is learned, the medical image for above-mentioned same physical feeling for the current time with selection carries out difference identification, or
The difference identification to history medical image can also only be carried out.
It is appreciated that comparing Recognition Different, therefore the present invention when identification multiple image difference and between every two images
Embodiment introduces the identification image difference of proposition of the embodiment of the present invention for identifying the difference of above-mentioned first image and the second image
Different method can be referring to of the invention real under arbitrary image display pattern or the difference identification scene of different field image
The method identification image difference for applying the identification image difference of example proposition, all in protection scope of the embodiment of the present invention.
S102, the character pixel point set for obtaining the first image and second image respectively;
Specifically, the feature pixel of image, is the pixel for referring to indicate characteristics of image.Difference of the embodiment of the present invention
Grayscale, the edge gradient in each neighborhood of pixel points of the first image and the second image are calculated, then according in neighborhood of pixel points
Grayscale, edge gradient is chosen can wherein indicate the pixel of characteristics of image, as feature pixel.First image and second
All feature pixels of image respectively constitute the character pixel point set of the first image and the character pixel point set of the second image
It closes, then the character pixel point set of the first image can represent the first image, and the character pixel point set of the second image can generation
The second image of table.
S103, the character pixel point set of the first image and the character pixel point set of second image are carried out
Matching treatment determines the coordinate of the matched pixel point of the first image and second image;
Specifically, by the spy with the second image respectively of each feature pixel in the character pixel point set of the first image
Each feature pixel in sign pixel collection is matched, and judges the feature pixel of the first image and the spy of the second image
Whether the similarity of sign pixel is greater than given threshold, if the character pixel of the feature pixel of the first image and the second image
The similarity of point is greater than given threshold, then it is assumed that the feature pixel of the first image is matched with the feature pixel of the second image.
According to the method described above, the character pixel point set of the first image and the character pixel point set of the second image are determined respectively
In conjunction, the feature pixel to match determines the matched pixel point of the first image and the second image.
Then, it is determined that coordinate of the matched pixel point of above-mentioned first image and the second image in image coordinate system.
S104, according to the coordinate of the first image and the matched pixel point of second image, be calculated described
The error image of one image and second image;
Specifically, after determining the coordinate of matched pixel point of the first image and the second image, with the first image and second
On the basis of the coordinate of the matched pixel point of image, the first image and the second image are transformed into same coordinate position and shown, then
The first image that same coordinate position is shown and the second image are asked poor, obtain the error image of the first image and the second image.
S105, according to the error image, determine the differential image region of the first image and second image.
Specifically, reasoning obtains from error image after the error image that the first image and the second image is calculated
Effective difference in error image, that is, effective difference of the first image and the second image, then connect effective difference
Lead to field mark to get differential image region is arrived.
By above-mentioned introduction as it can be seen that the embodiment of the present invention automation identification image difference technical solution, obtain to
After the first image and the second image of Recognition Different, the feature pixel of the first image and second image is obtained respectively
Set;Then the character pixel point set of the character pixel point set of the first image and second image is matched
Processing, determines the coordinate of the matched pixel point of the first image and second image, and according to the first image and
The coordinate of the matched pixel point of second image, is calculated the error image of the first image and second image;
Finally according to the error image, the differential image region of the first image and second image is determined.Above-mentioned technical side
Case realizes the differential image region of the identification two images of automation, that is, the identification image difference of automation is realized, by it
It is applied in medical image difference identification, visually than doctor faster, recognition efficiency is higher for the speed of identification medical image difference.
Optionally, in another embodiment of the present invention, shown in Figure 2, it is described to obtain the first of difference to be identified
Image and the second image, comprising:
S201, the first image and preset contrast images set are obtained;Wherein, the image in the contrast images set with
The imageable target of the first image is identical;
Specifically, above-mentioned first image, refers to that patient is directed to the medical image of a certain physical feeling shooting at current time.
Above-mentioned preset contrast images set refers to above-mentioned patient in medical history, for the medicine figure of same physical feeling shooting
The set of picture.The contrast images set, the medical image that can be stored in medical image data bank.
S202, the character pixel for extracting the first image and every piece image in the contrast images set respectively
Point obtains the character pixel point set of the first image and the feature of every piece image in the contrast images set
Pixel collection;
Specifically, the feature pixel of image, is the pixel for referring to indicate characteristics of image.Difference of the embodiment of the present invention
Calculate grayscale in each neighborhood of pixel points of the first image and every piece image in above-mentioned contrast images set, edge ladder
Degree chooses the picture that can wherein indicate characteristics of image then according to the value range of grayscale, edge gradient in neighborhood of pixel points
Vegetarian refreshments, as feature pixel.
According to above-mentioned feature pixel choosing method, extracted in above-mentioned first image and above-mentioned contrast images set respectively
Every piece image feature pixel, obtain each in the character pixel point set and contrast images set of the first image
The character pixel point set of width image.
S203, respectively by each width figure in the character pixel point set of the first image and the contrast images set
The character pixel point set of picture is matched, and the matching characteristic with the first image is selected from the contrast images set
The most image of pixel, as the second image.
Specifically, by the grayscale and edge of each of the character pixel point set of above-mentioned first image feature pixel
Gradient value, respectively with each of the character pixel point set of every piece image in above-mentioned contrast images set character pixel
The grayscale and edge gradient value of point compare, and the difference of grayscale and edge gradient value is less than to the feature pixel of given threshold
It is determined as matching characteristic pixel.
According to the method described above, of every piece image in above-mentioned first image and above-mentioned contrast images set is determined respectively
With pixel quantity, the figure most with the matched pixel point quantity of above-mentioned first image is selected from above-mentioned contrast images set
Picture, as the second image.
It is appreciated that above-mentioned second image is substantially the image most like with the first image, that is, be currently directed to
First image of a certain physical feeling shooting of patient is most like, cures for the history of the same section of same physical feeling shooting
Learn image.
Further, in the character pixel point set and above-mentioned contrast images set for extracting above-mentioned first image respectively
Every piece image character pixel point set after, be referred to above-mentioned processing method, from above-mentioned contrast images set, choosing
The piece image with the matching characteristic pixel quantity of the first image more than any period of certain threshold value is selected, as the second figure
Picture.The piece image in above-mentioned any period, then be image similar with the first image, but not necessarily most like image,
The second image selected at this time is the medical image for any period of history for the same physical feeling of patient chosen.
Step S204~S207 in the present embodiment respectively correspond the step S102 in embodiment of the method shown in FIG. 1~
S105, the content of particular content embodiment of the method shown in Figure 1, details are not described herein again.
Optionally, in another embodiment of the present invention, shown in Figure 3, it is described according to the first image and institute
The error image of the first image and second image is calculated in the coordinate for stating the matched pixel point of the second image, packet
It includes:
S304, according to the coordinate of the first image and the matched pixel point of second image, calculate first figure
The transformation matrix of picture or second image;
Specifically, above-mentioned transformation matrix, refers to the transformation matrix translated to Image display position.For above-mentioned
One image and the second image fix the display position coordinate of wherein piece image, then according to the matching with another piece image
The coordinate of pixel is calculated the transformation matrix of another width image translation to identical display position.For example, the first image is being schemed
As the display position of coordinate system is fixed, then according to the matched pixel of the first image and the second image point coordinate, calculate second
The transformation matrix that image translation is shown to the first Image display position is to get to the transformation matrix of the second image.
S305, according to the transformation matrix, the first image and second image are converted in same coordinate position
Set the image of display;
Specifically, the corresponding image of the transformation matrix is carried out display position according to the above-mentioned transformation matrix being calculated
Translation, shows that above-mentioned two images in identical coordinate position.For example, the second image is calculated by step S304
After transformation matrix, the second image is subjected to display position transformation according to the transformation matrix, that is, by the second image translation to the
The identical coordinate position in the display position of one image is shown, becomes the first image and the second image in same coordinate position
The image of display.
The difference of the first image and the second image that S306, calculating are shown in same position, and carry out at pixel normalization
Reason, obtains the error image of the first image and second image.
Specifically, above-mentioned the first image shown in same coordinate position and the second image are carried out difference operation, calculate
The difference of first image and the second image, and the pixel value difference being calculated is normalized, obtain the first image and
The error image of second image.
Step S301~S303, S307 in the present embodiment respectively correspond the step in embodiment of the method shown in FIG. 1
S101~S103, S105, the content of particular content embodiment of the method shown in Figure 1, details are not described herein again.
Optionally, in another embodiment of the present invention, shown in Figure 4, it is described according to the error image, it determines
The differential image region of the first image and second image, comprising:
S405, the error image is inputted into trained convolutional neural networks, makes the convolutional neural networks reasoning
Obtain the mask figure of the error image;Wherein, the mask figure includes effective difference content of the error image;
Specifically, convolutional neural networks are inputted error image, make convolution by training convolutional neural networks of the embodiment of the present invention
The mask figure of the error image of ANN Reasoning input, then according to the mask figure of the error image of prior fixed input
Adjustment is carried out to convolutional neural networks, training of the above process realization to convolutional neural networks is executed repeatedly, makes the convolutional Neural
Network has the ability of the mask figure of reasoning error image.
Above-mentioned mask figure refers to that with the image of binary representation image slices vegetarian refreshments, the valid pixel in image is labeled
It is 1, useless pixel is marked as 0.Then the content that is particularly shown of the mask figure of above-mentioned error image is: indicating in error image
The value for the pixel that first image and the second image have differences is 1, indicates the first image and the identical pixel of the second image
Value be 0.It is appreciated that being worth indicates the first image and the second image for 1 pixel in the mask figure of above-mentioned error image
Corresponding pixel points it is different, being worth indicates that the corresponding pixel points of the first image and the second image are identical for 0 pixel.
The error image of first image and the second image is inputted above-mentioned trained convolutional Neural by the embodiment of the present invention
Network, reasoning obtain the mask figure of the error image.
S406, connected component labeling processing is carried out to the mask figure, determines the first image and second image
Differential image region.
Specifically, all pixels point for being marked as 1 carries out connected component labeling by mask figure, realize the quilt of connection
Labeled as 1 pixel forming region, then the connected domain obtained is the difference section for indicating the first image and the second image
The differential image region in region, i.e. the first image and the second image.
Step S401~S404 in the present embodiment respectively correspond the step S101 in embodiment of the method shown in FIG. 1~
S104, the content of particular content embodiment of the method shown in Figure 1, details are not described herein again.
Optionally, it also discloses in another embodiment of the present invention, the method for above-mentioned identification image difference is also wrapped
It includes:
The processing of profile trace is carried out to the differential image region, obtains the profile in the differential image region;
Calculate and export the area and diameter in the differential image region.
Specifically, in embodiments of the present invention, after determining the differential image region of the first image and the second image, also into
One step carries out the processing of profile trace to determining differential image region, that is, depicts the profile in differential image region, specifically can be
Directly describe the profile in differential image region on the first image or the second image that same coordinate position is shown.
Further, the embodiment of the present invention can also calculate the image-region that depicted differential image profile is included
Area and diameter.Specifically, by the pixel quantity for being marked as 1 for calculating all directions that differential image region includes,
It can determine the differential image region contour in the diameter of the direction;What statistical discrepancy image-region included all is marked as 1
Pixel quantity, can determine the area for the image-region that the differential image region contour is included.
It should be noted that above-mentioned handle to obtain the wheel in differential image region to differential image region progress profile trace
Exterior feature, and the concrete processing procedure of differential image region area and diameter is calculated, it is emerging referring also to common calculating image sense
The treatment process of the parameter in interesting region.
After the profile in above-mentioned differential image region, the area and diameter in differential image region is calculated, the present invention
Embodiment, which can also be controlled further, exports above-mentioned profile, area and diameter, so that user (doctor) can more clearly send out
The situation of change of existing patient body.
Another embodiment of the present invention also discloses a kind of device for identifying image difference, shown in Figure 5, the device packet
It includes:
Image acquisition unit 100, for obtaining the first image and the second image of difference to be identified;
Feature pixel acquiring unit 110, for obtaining the feature picture of the first image and second image respectively
Vegetarian refreshments set;
Matching treatment unit 120, the spy for character pixel point set and second image to the first image
It levies pixel collection and carries out matching treatment, determine the coordinate of the matched pixel point of the first image and second image;
Difference computational unit 130, for the coordinate according to the first image and the matched pixel point of second image,
The error image of the first image and second image is calculated;
Differential image determination unit 140, for determining the first image and second figure according to the error image
The differential image region of picture.
Optionally, in another embodiment of the invention, shown in Figure 6, described image acquiring unit 100, comprising:
First acquisition unit 1001, for obtaining the first image and preset contrast images set;Wherein, the comparison diagram
Image in image set conjunction is identical as the imageable target of the first image;
Feature pixel extraction unit 1002, for being extracted in the first image and the contrast images set respectively
The feature pixel of every piece image obtains the character pixel point set and the contrast images set of the first image
In every piece image character pixel point set;
Image selection unit 1003, for respectively by the character pixel point set of the first image and the contrast images
The character pixel point set of every piece image in set is matched, and is selected from the contrast images set and described
The most image of the matching characteristic pixel of one image, as the second image.
Optionally, in another embodiment of the invention, shown in Figure 7, the difference computational unit 130, comprising:
First computing unit 1301, for the seat according to the first image and the matched pixel point of second image
Mark calculates the transformation matrix of the first image or second image;
Image conversion unit 1302, for according to the transformation matrix, the first image and second image to be turned
It is changed to the image shown in same coordinate position;
Second computing unit 1303, for calculating the difference of the first image and the second image that show in same position, and
Pixel normalized is carried out, the error image of the first image and second image is obtained.
Optionally, in another embodiment of the invention, shown in Figure 8, the differential image determination unit 140, packet
It includes:
Image reasoning element 1401 makes described for the error image to be inputted trained convolutional neural networks
Convolutional neural networks reasoning obtains the mask figure of the error image;Wherein, the mask figure includes having for the error image
Imitate difference content;
Processing unit 1402 is marked, for carrying out connected component labeling processing to the mask figure, determines the first image
With the differential image region of second image.
Optionally, in another embodiment of the invention, described device further include:
Output unit obtains the differential image region for carrying out the processing of profile trace to the differential image region
Profile;Calculate and export the area and diameter in the differential image region.
Specifically, the specific works content of each unit in the various embodiments described above, refers to above method embodiment
Content, details are not described herein again.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment weight
Point explanation is the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other.
For device class embodiment, since it is basically similar to the method embodiment, so being described relatively simple, related place ginseng
See the part explanation of embodiment of the method.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by
One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning
Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that
A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or
The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged
Except there is also other identical elements in the process, method, article or apparatus that includes the element.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention.
Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention
It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one
The widest scope of cause.