Hi!
I'm trying to write a script to open an image in the RGB color space with feature of interest in blue. Next, I would like to call in in the script the color thresholder app and then to use it to interactively select this feature in the hsv space and export the binary image, named BW to the workspace.
I'm scripting it as I will have a lot of images to run. However, these images will have different shades of blue and it is not possible to apply the same saturation limits on all images and hence the reason for doing it interactively.
I don't know how to wait for the export of the binary image from the color thresholder app by the user before executing the rest of the script.
I'm using Matlab R2016b.
Any help would be greatly appreciated.
Here is the script that I have written so far:
[FileName,PathName] = uigetfile({'*.jpg';'*.tif';'*.png';'*.*'},'select image file');
image = imread(FileName);
figure; imshow(image);
colorThresholder(image);
BW = bwareaopen(BW,100);
BW = imfill(BW,'holes');
objperim = bwperim(BW);