I have a code which which I am a bit confused on how to optimize in order to make it work for an image http://tinypic.com/view.php?pic=2jdx6g&s=7 since I am not able to modify the function imopen to remove the background illumination in order to obtain clear picture of the coronary vessels. Any suggestion?
That is not what imopen is supposed to do. If anything it would be imclose() which does a dilation (smear bright stuff over the dark vessels) followed by an erosion (to return enlarged bright things to their original size). But I'd look at the literature to see what people are doing successfully with angiograms rather than spend time implementing something that ends up being really primitive and ineffective. http://iris.usc.edu/Vision-Notes/bibliography/contentsmedical.html#Medical%20Applications,%20CAT,%20MRI,%20Ultrasound,%20Heart%20Models,%20Brain%20Models