I m making app in netbeans platform in java using Swing technology for dentist. i want to measure length of line which is drawn by user on image's of teeth? so, then Doctor can find the length of root canal of teeth.and line can also be not straight, line can be ZigZag.if any one have idea about that then share with me please.
2 回答
That is not very easy because the images are taken from different angles or distances as I suppose. You will need some kind of scale in the image which length you know. Think of a tag with a size of 5mm x 5mm which is pasted on the tooth. In you application you can then measure this tag. Lets say its edge size is 200x200 Pixel. Then you know that 200 Pixels are 5mm and you have the formula to calculate the real size from the line length.
You can use one of the many line detection algorithms to detect the existence of lines and then measure the line in pixels.
You can use an image processing library that already has these algorithms implemented, or you can implement them your self (better use a library though), this question is about image processing libraries and approaches in java.