# 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:

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);


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?

 2 retagged berak 30959 ●4 ●75 ●297

### 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:

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);


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?