How to better segment out and label brown-colored lymphatic vessels on a histology image?
How to better segment out and label brown-colored lymphatic vessels on a histology image?
Need to choose a proper conversion, segmentation, labelling methods and respective image processing libraries.
I have tried Java Open CV code:
package javaopencvapp;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.CvType;
import org.opencv.core.Scalar;
import javaopencvapp.ImageViewer;
import org.opencv.core.Mat;
import org.opencv.imgcodecs.Imgcodecs;
import org.opencv.imgproc.Imgproc;
public class JavaOpenCVapp {
static{ System.loadLibrary(Core.NATIVE_LIBRARY_NAME); }
public static void main(String[] args) throws Exception {
String filePath = "src/images/imth2.tif";
Mat newImage = Imgcodecs.imread(filePath);
Imgproc.threshold(newImage, newImage, 172, 179.0, Imgproc.THRESH_BINARY);
//* Imgproc.threshold(newImage, newImage, 0, 125, Imgproc.THRESH_BINARY + Imgproc.THRESH_OTSU);
//* Imgproc.adaptiveThreshold(newImage, newImage, 255, Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C, Imgproc.THRESH_BINARY, 11, 2);
//* Imgproc.adaptiveThreshold(newImage,newImage, 255, Imgproc.ADAPTIVE_THRESH_MEAN_C,Imgproc. THRESH_BINARY, 15, 40);
if(newImage.dataAddr()==0){
System.out.println("Couldn't open file " + filePath);
}else{
ImageViewer imageViewer;
imageViewer = new ImageViewer();
imageViewer.show(newImage, "Loaded image");
}
}
ImageJ / Fiji are more appropriate tools for image analysis in my opinion. For example, you can test the different auto threshold methods directly in the application.