O'Reilly logo

Visual Media Processing Using MATLAB Beginner's Guide by George Siogkas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – automating our function for red eye reduction

This time, we will use one extra tool in our function, removing the need for ROI selection. The rationale of the refined function will be to first check the image for circular regions in color channel a* (we must find two) and then perform masking of the pixels in these regions having high a* values. You may have noticed that we did not mention any manual ROI selection step. However, we should state the suspected radii for the circle detection.

  1. Let's see if this approach works, by first writing our function:
    function output = RedEyeReductionCircular(input, thresh, radii) % Function for red eye reduction in input image % Inputs: % input - Input image % thresh – Threshold value in channel ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required