10

Apologies for thread necromancny, I've attempted to produce a cut down version for testing, it's available here

https://www.dropbox.com/sh/y0wtlae37yltfz5/yRDSyKj2NY

The largest part of the download is the 3 sample images in the src folder (2 of them are medical grade fundus images so they're a bit big). Sorry if the overall size of the solution is still a bit big but I can't cut it down any smaller without a serious rethink (I admit I'm a little sleep deprived and have to get to work in 20 minutes).

My original description of the problem is as follows

My problem is as thus. I have a BufferedImage of the human retina, now using an Adaptive Thresholder I've successfully extracted the blood vessel structure from the eye, the rest of my software deals with charting the bloodvessels and determining their thickness, I believe this is functioning correctly. The final result displays all the coordinates offset by a fair degree from their actual location (looking closely you can see the curvature of some of the seeds that have linked correctly following bloodvessels, and the coordinates follow the circumfrance of the image. My question is this, what is causing this offset, and how do I remedy it?

  • Sorry, as a note it seems the smaller Jpeg SampleIMage does a much better job of showing the red pixels, they're just too tiny in the large image. – Riccardo Viglianisi May 31 '12 at 02:43
  • +1, just joined and followed the rules about how to ask question! – TeaCupApp May 31 '12 at 02:43
  • 1
    For better help sooner, post an [SSCCE](http://sscce.org/). – Andrew Thompson May 31 '12 at 03:14
  • 1
    Well I've produced a cut down version of the project for putting up here. https://www.dropbox.com/sh/y0wtlae37yltfz5/yRDSyKj2NY Navigate to the Odin folder and either download the zip or the individual java files, dumping them into your IDE compiling them all and running OdinMain should be enough to get the ball rolling. At this point open one of the Jpegs in the file browser window that pops up, three buttons on the bottom of this control control some functions assigned to the image, firstly select RB Filter, then Adaptive Thresholder, then Vein Tracker. – Riccardo Viglianisi May 31 '12 at 07:30
  • You really need to create a simple self-contained example if you want to get help. Nobody really wants to download a bunch of files, put them into an IDE, and them trouble-shoot for you. Perhaps your example code can fetch a source image from the Internet. – Steve McLeod Jun 05 '12 at 17:37

1 Answers1

0

The coordinates have no offset, but their scale is wrong: The red pixels coordinates are scaled by 0.75 (probably). In OdinVeinThicknessGen.java at line 333 try to replace

wRast.setPixel(x6, y6, redVal);

by

wRast.setPixel(x6 * 4 / 3, y6 * 4 / 3, redVal);

I don't know why, you should be faster in finding it out as you know your code better than me… ;-)


Please note that you should really provide a Short, Self Contained, Correct (Compilable), Example (as already suggested by Andrew and Steve in their comments) when asking your next questions as it is a lot of work (and needs a lot of time many here don't have or want to take) to just recognize your problem if you don't. Thank you!

EDIT: I just looked at your original question (i.e. before your edit). Although it does not contain a SSCCE it contains some code and helpful information to better find the relevant parts in your application. In my opinion it would have been better to let the question as it was and just add the link to the full project. A sample image where the red pixels are better to recognize (e.g. bigger dots) would have been helpful, too. Please don't get me wrong, I just want to give you some input for future questions… :-)

siegi
  • 5,646
  • 2
  • 30
  • 42