Today I spent about 50 minutes to implement a simple test function in Matlab. Based upon the paper by Ebert et al. from 2002 titled “Designing Effective Transfer Functions for Volume Rendering from Photographic Volumes”, I wanted to see how the color distance of a selected pixel would relate to the rest of the image. I was interested to find out if, using solely the color distance, you could classify materials in some way. With color distance being the euclidean distance in the CIELUV color space as described in the paper by Ebert et al.
The function simply converts an input image to CIELUV and enables the user to select a pixel. The CIELUV values of the selected pixel are retrieved and for every pixel in the image the gradient magnitude between that reference pixel and the current pixel in the loop (through the image) are found. If it is below a supplied threshold the pixel in the output image will keep its original RGB value, else it will be set to zero.
I have made a short screencap demonstrating the function and included it below.
Popularity: 100%
Write a Comment
Let me know what you think?