Ask Your Question

Douglas Gatti's profile - activity

2013-11-01 16:18:45 -0600 received badge  Editor (source)
2013-11-01 16:18:09 -0600 answered a question How to generate/convertto 1 bit depth image

Are talking about thresholding?

cvThreshold(const CvArr* src, CvArr* dst, double threshold, double max_value, int threshold_type)

http://docs.opencv.org/2.4.5/modules/imgproc/doc/miscellaneous_transformations.html?highlight=threshold#void adaptiveThreshold(InputArray src, OutputArray dst, double maxValue, int adaptiveMethod, int thresholdType, int blockSize, double C)

2013-11-01 16:09:31 -0600 received badge  Student (source)
2013-11-01 16:03:34 -0600 asked a question 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?