Summary of the invention
The purpose of the embodiment of the present invention is to be provided at the method and apparatus of locator key section in brain CT image, is intended to solution long in the existing locator key section time, the problem be affected by human factors.
The embodiment of the present invention is achieved in that a kind of method of locator key section in brain CT image, and described method comprises the steps:
Determine the latter half of brain CT image;
The row of fracture appear in the latter half that calculates described brain CT image by pixel, and add up the number of the row of described appearance fracture;
The number threshold values of the row of the number of the row of described appearance fracture and predefined appearance fracture is compared, if the number of the row of described appearance fracture is greater than the number threshold values of the row of predefined appearance fracture, will occur that the brain CT image of described number is defined as the petrous bone section.
Another purpose of the embodiment of the present invention is a kind of method that is provided at locator key section in brain CT image, said method comprising the steps of:
Determine center section in brain CT image;
Calculate the average gray g of described center section
s;
From top to bottom, according to formula (g
s-g
s-1)/g
scalculate the graded value of more last section gray scale, and the brain CT image of described graded value maximum is defined as to brain side room CT image.
Another purpose of the embodiment of the present invention is to provide a kind of device of locator key section in brain CT image, and described device comprises:
The latter half determining unit, for determining the latter half of brain CT image;
Fracture column count unit, the row that rupture occur for the latter half that calculates the definite brain CT image of described latter half determining unit by pixel;
Fracture row statistic unit, the number of the row that rupture for the appearance of adding up the calculating of described fracture column count unit;
The threshold values comparing unit, be used for the number threshold values of the row of the number of described fracture row statistic unit statistics and predefined appearance fracture is compared, if the number of the row of described appearance fracture is greater than the number threshold values of the row of predefined appearance fracture, will occur that the brain CT image of described number is defined as the petrous bone section.
Another purpose of the embodiment of the present invention is to provide a kind of device of locator key section in brain CT image, and described device comprises:
The center section determining unit, for determining center section at brain CT image;
The average gray computing unit, for calculating the average gray g of the definite center section of described center section determining unit
s;
Grey scale change value computing unit, for from top to bottom, according to formula (g
s-g
s-1)/g
scalculate the graded value of more last the section of average gray of described average gray computing unit calculating.
The embodiment of the present invention, at first determine the latter half of brain CT image slices, then calculate by pixel the number that occurs the row of fracture in every section, and the number of the row that rupture according to described appearance determines whether the section of petrous bone, a kind of method of obtaining petrous bone CT image slices by direct calculating is provided, has improved the speed of obtaining image slices.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
The embodiment of the present invention, at first determine the latter half of brain CT image slices, then calculate by pixel the number that occurs the row of fracture in every section, and the number of the row that rupture according to described appearance determines whether the section of petrous bone, a kind of method of obtaining petrous bone CT image slices by direct calculating is provided, has improved the speed of obtaining image slices.
For technical solutions according to the invention are described, below by specific embodiment, describe.
Embodiment mono-:
The realization flow of locator key dicing method in brain CT image that Fig. 1 shows that one embodiment of the invention provides said method comprising the steps of:
In step S101, determine the latter half of brain CT image.
In embodiments of the present invention, because petrous bone is positioned at the latter half of brain, therefore according to this characteristic of petrous bone, the latter half image that only needs brain CT section, search and can save a lot of calculating at described latter half, as shown in Figure 2, wherein white portion is the latter half of brain CT image to its effect.Its concrete definite method is as follows:
(1), obtain the Y-axis coordinate fP on summit on described brain CT image and the Y-axis coordinate bP on lower summit;
(2) Y-axis of, according to formula yM=fP+ (bP-fP)/3, calculating lower summit is the Y-axis coordinate yM at 1/3 place up.YM is the latter half of the brain CT image needed to the coordinate range of bP.
In step S102, the row of fracture appear in the latter half that calculates described brain CT image by pixel, and add up the number of the row of described appearance fracture.
In embodiments of the present invention, after the latter half of determining brain CT image, calculate the number of often listing existing fracture of the latter half that obtains described brain CT image, as shown in Figure 3, wherein dotted line represents the row that fracture occurs to its display effect.The method of the row of fracture appears in the described latter half that calculates described brain CT image by pixel, comprising:
Latter half to described brain CT image carries out the pixel classification: brain is divided into a class pixel, and background is a class pixel.
The pixel of can brain in concrete implementation process dividing is set to grey, and the pixel of background parts is set to black.
By the latter half of the described brain CT of column scan image, and calculate in permutation and belong to length that brain divides and the length of permutation by pixel, the length of wherein said permutation is the most front length to the brain rearmost point of brain from current scan line.
In concrete implementation process, can be made as L by belonging to the length in pixels that brain divides in column of pixels, the difference Dy of the Y coordinate by calculating first pixel in column of pixels and the Y coordinate of last pixel calculates the length of column of pixels.
The relation that belongs to the length of length that brain divides and permutation in more described permutation, belong to if the length of described permutation is greater than in described permutation the length that length that brain divides adds two unit picture elements, thinks the described row that fracture occurs of classifying as.
In step S103, the number threshold values of the row of the number of the row of described appearance fracture and predefined appearance fracture is compared, if the number of the row of described appearance fracture is greater than the number threshold values of the row of predefined appearance fracture, will occur that the brain CT image of described number is defined as the petrous bone section.
The embodiment of the present invention, at first determine the latter half of brain CT image slices, then calculate by pixel the number that occurs the row of fracture in every section, and the number of the row that rupture according to described appearance determines whether the section of petrous bone, a kind of method of obtaining petrous bone CT image slices by direct calculating is provided, has improved the speed of obtaining image slices.
As an optional embodiment of the present invention, before described step S101, described method is further comprising the steps of:
From the brain CT image of brain area maximum, start down to be scanned.
Therefore in embodiments of the present invention, petrous bone is positioned at the part on the lower of brain, and the brain CT image of brain area maximum is the center section of section, starts down to scan from the brain CT image of brain area maximum and can save a lot of time.
As another alternative embodiment of the invention, before described step S103, described method is further comprising the steps of:
Set the number threshold values of the row that fracture occurs.
Embodiment bis-:
The process flow diagram of locator key dicing method in brain CT image that is illustrated in figure 4 that further embodiment of this invention provides said method comprising the steps of:
In step S401, determine center section in brain CT image.
In embodiments of the present invention, the position of telocoele is near the zone of calvarium, and mainly is positioned at the center section of head, therefore need at first determine the center section of head, and the step of described definite head center section is specially:
(1) rectangle that, calculates brain CT image deutocerebrum surrounds frame.
In concrete implementation process, set up rectangle according to the summit of brain CT image surrounding and surround frame, so both brain can be included in to described rectangle and surround in frame, its design sketch is as shown in Figure 5.
(2) new little rectangle is calculated in the zone of, selecting described rectangle to surround each limit of frame 1/4-3/4.
In embodiments of the present invention, the zone that described rectangle surrounds each limit of frame 1/4-3/4 is the center section that described rectangle surrounds frame, by described zone, forms the center section that little rectangle is head, and its display effect as shown in Figure 6.
In step S402, calculate the average gray g of described center section
s.
In embodiments of the present invention, calculate the average gray of center section definite in brain CT image, calculate the method for described average gray and use prior art, therefore not to repeat here.
In step S403, from top to bottom, according to formula (g
s-g
s-1)/g
scalculate the graded value of more last section gray scale, and the brain CT image of described graded value maximum is defined as to brain side room CT image.
In embodiments of the present invention, because the brain side room presents low-density characteristic, for low-density characteristic characteristic of correspondence in the CT image, be exactly that gray scale is more and more shallow, therefore can determine brain side room image according to the graded value of gray scale, the brain CT image of described graded value maximum is defined as brain side room CT image.
The embodiment of the present invention, the center section of at first definite brain CT image, then calculate the average gray of described center section, and determine brain side room CT image according to the changing value of described average gray.A kind of method of obtaining brain side room CT image slices by direct calculating is provided, has improved the speed of obtaining image slices.
Embodiment tri-:
The structural drawing of locator key slicing device in brain CT image that is illustrated in figure 7 that one embodiment of the invention provides for convenience of explanation, only illustrates part related to the present invention:
Latter half determining unit 701, for determining the latter half of brain CT image.
In embodiments of the present invention, because petrous bone is positioned at the latter half of brain, therefore according to this characteristic of petrous bone, only need the latter half image of brain CT section, at described latter half, search and can save a lot of calculating.Described latter half determining unit 701 specifically comprises:
Summit Y-axis coordinate obtains subelement 7011, for the Y-axis coordinate fP that obtains summit on described brain CT image and the Y-axis coordinate bP on lower summit.
Latter half computation subunit 7012, for according to described summit Y-axis coordinate, obtaining the apex coordinate that subelement 7011 obtains, the Y-axis of calculating lower summit according to formula yM=fP+ (bP-fP)/3 is the Y-axis coordinate yM at 1/3 place up.YM is the latter half of the brain CT image that we need to the coordinate range of bP.
Fracture column count unit 702, the row that rupture occur for the latter half that calculates the definite brain CT image of described latter half determining unit 701 by pixel.
Fracture row statistic unit 703, the number of the row that rupture for the appearance of adding up 702 calculating of described fracture column count unit.
In embodiments of the present invention, after the latter half of determining brain CT image, calculate the number of often listing existing fracture of the latter half that obtains described brain CT image.Described fracture column count unit 702 specifically comprises:
Pixel classification subelement 7021, the latter half of described brain CT image is carried out to the pixel classification: brain is divided into a class pixel, and background is a class pixel.
The pixel of can brain in concrete implementation process dividing is set to grey, and the pixel of background parts is set to black.
Column scan subelement 7022, for the latter half by the described brain CT of column scan image, and calculate in permutation and belong to length that brain divides and the length of permutation by pixel, the length of wherein said permutation is the most front length to the brain rearmost point of brain from current scan line.
In concrete implementation process, can be made as L by belonging to the length in pixels that brain divides in column of pixels, the difference Dy of the Y coordinate by calculating first pixel in column of pixels and the Y coordinate of last pixel calculates the length of column of pixels.
Compare subelement 7023, the relation that belongs to the length of length that brain divides and permutation for 7022 permutations of more described column scan subunit computes, belong to if the length of described permutation is greater than in described permutation the length that length that brain divides adds two unit picture elements, think the described row that fracture occurs of classifying as.
Threshold values comparing unit 704, be used for the number threshold values of the row of the number of described fracture row statistic unit 703 statistics and predefined appearance fracture is compared, if the number of the row of described appearance fracture is greater than the number threshold values of the row of predefined appearance fracture, will occur that the brain CT image of described number is defined as the petrous bone section.
The embodiment of the present invention, at first determine the latter half of brain CT image slices, then calculate by pixel the number that occurs the row of fracture in every section, and the number of the row that rupture according to described appearance determines whether the section of petrous bone, a kind of method of obtaining petrous bone CT image slices by direct calculating is provided, has improved the speed of obtaining image slices.
As an optional embodiment of the present invention, before described latter half determining unit 701 is determined the latter half of brain CT image, described device also comprises:
The maximum scan unit, start down to be scanned for the brain CT image from brain area maximum.
Therefore in embodiments of the present invention, petrous bone is positioned at the part on the lower of brain, and the brain CT image of brain area maximum is the center section of section, starts down to scan from the brain CT image of brain area maximum and can save a lot of time.
As another alternative embodiment of the invention, described threshold values comparing unit 704 carry out threshold values relatively before, described device also comprises:
The threshold value setting unit, for setting the number threshold values of the row that fracture occurs.
Embodiment tetra-:
The structural drawing of locator key slicing device in brain CT image that is illustrated in figure 8 that further embodiment of this invention provides, for convenience of explanation, only illustrate the part relevant to the embodiment of the present invention, comprising:
Center section determining unit 801, for determining center section at brain CT image.
In embodiments of the present invention, the position of telocoele is near the zone of calvarium, and mainly is positioned at the center section of head, therefore need at first determine the center section of head.Described center section determining unit 801 specifically comprises:
Rectangle surrounds frame computation subunit 8011, for the rectangle that calculates brain CT image deutocerebrum, surrounds frame.
In concrete implementation process, set up rectangle according to the summit of brain CT image surrounding and surround frame, so both brain can be included in to described rectangle and surround in frame.
Little rectangle computation subunit 8012, surround the zone of each limit of frame 1/4-3/4 and calculate new little rectangle for the rectangle of selecting described rectangle to surround 8011 calculating of frame computation subunit.
In embodiments of the present invention, the zone that described rectangle surrounds each limit of frame 1/4-3/4 is the center section that described rectangle surrounds frame, by described zone, forms the center section that little rectangle is head.
Average gray computing unit 802, for calculating the average gray g of the definite center section of described center section determining unit 801
s.
In embodiments of the present invention, calculate the average gray of center section definite in brain CT image, calculate the method for described average gray and use prior art, therefore not to repeat here.
Grey scale change value computing unit 803, for from top to bottom, according to formula (g
s-g
s-1)/g
scalculate the graded value of more last the section of average gray of described average gray computing unit 802 calculating.
In embodiments of the present invention, because the brain side room presents low-density characteristic, for low-density characteristic characteristic of correspondence in the CT image, be exactly that gray scale is more and more shallow, therefore can determine brain side room image according to the graded value of gray scale, the brain CT image of described graded value maximum is defined as brain side room CT image.
The embodiment of the present invention, the center section of at first definite brain CT image, then calculate the average gray of described center section, and determine brain side room CT image according to the changing value of described average gray.A kind of method of obtaining brain side room CT image slices by direct calculating is provided, has improved the speed of obtaining image slices.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.