Ask Your Question

Revision history [back]

X-ray vertebrae detection

I am currently working on a project to detect vertebraes on a X-ray utilizing openCV in java language. The problem is to find the vertebraes edges to utilize Hough Transform to detect the lines (points) to detect scoliosis. I have been struggling for a while to detect the edges utilizing Canny and did not achieve the expected results. After applying these methods:

cvEqualizeHist(image, image);
cvSmooth(image,image, CV_MEDIAN, 13);
cvCanny(image, imageCanny, 20, 45, 3);

The result was as follows:image description

As you can see the vertebraes are unconsistent, with broken edges.

I have done alot of tests and coding and have not come up with any satisfying result. I have tried utilizing Sobel detection algorithms and Laplacian, as well and the Morphology Gradient detection, which gave the best result untill now.

The result for the Gradient detection is as follows:

    cvEqualizeHist(image, image);
    cvSmooth(image,image, CV_MEDIAN, 13);
  //creates image with 120 pixel values and subtracts from original image, taking out unwanted information
    cvThreshold(image,tmp, 0, 120, CV_THRESH_BINARY);
    cvSub(image, tmp, image, null);
IplConvKernel kernelCross = cvCreateStructuringElementEx(5, 5,3,3, CV_SHAPE_CROSS, null);
cvMorphologyEx(image, imageCross, tmp, kernelCross, CV_MOP_GRADIENT, 3);

image description

Im thinking about continuing coding with the results of the gradient detected image. The edges seems better detected, but there are also unwanted information in this image, when you apply Canny it also detects the soft tissues. The problem with removing noises from x-ray is that you also remove vertebrae information.

QUESTIONS: should I continue utilizing any of these methods? If yes, which ? And what can I do to improve the results or what shouldnt I be doing?

click to hide/show revision 2
retagged

updated 2013-11-02 05:53:03 -0600

berak gravatar image

X-ray vertebrae detection

I am currently working on a project to detect vertebraes on a X-ray utilizing openCV in java language. The problem is to find the vertebraes edges to utilize Hough Transform to detect the lines (points) to detect scoliosis. I have been struggling for a while to detect the edges utilizing Canny and did not achieve the expected results. After applying these methods:

cvEqualizeHist(image, image);
cvSmooth(image,image, CV_MEDIAN, 13);
cvCanny(image, imageCanny, 20, 45, 3);

The result was as follows:image description

As you can see the vertebraes are unconsistent, with broken edges.

I have done alot of tests and coding and have not come up with any satisfying result. I have tried utilizing Sobel detection algorithms and Laplacian, as well and the Morphology Gradient detection, which gave the best result untill now.

The result for the Gradient detection is as follows:

    cvEqualizeHist(image, image);
    cvSmooth(image,image, CV_MEDIAN, 13);
  //creates image with 120 pixel values and subtracts from original image, taking out unwanted information
    cvThreshold(image,tmp, 0, 120, CV_THRESH_BINARY);
    cvSub(image, tmp, image, null);
IplConvKernel kernelCross = cvCreateStructuringElementEx(5, 5,3,3, CV_SHAPE_CROSS, null);
cvMorphologyEx(image, imageCross, tmp, kernelCross, CV_MOP_GRADIENT, 3);

image description

Im thinking about continuing coding with the results of the gradient detected image. The edges seems better detected, but there are also unwanted information in this image, when you apply Canny it also detects the soft tissues. The problem with removing noises from x-ray is that you also remove vertebrae information.

QUESTIONS: should I continue utilizing any of these methods? If yes, which ? And what can I do to improve the results or what shouldnt I be doing?