0

I have used matlab's preview window in the following syntax:

figure('Name', 'My Custom Preview Window');uicontrol('String', 'Close', 'Callback', 'close(gcf)');  

I am able to successfully get the video stream. Now I want to have a small circle as a region of interest to return the average pixel value within this circle. I want this to be stored and named after a click of a button and recalled later for the further processing.

Could anyone guide me where I can start with?

Please note I dont want user to define ROI instead its always fixed as a small circle at the centre of field view. Whatever the colours comes within the circle I want mean values to be calculated and stored as a reference. Ps: I am not sure I am correct in calling ROI its simple circle in the field view

shiva
  • 115
  • 10

1 Answers1

0

You might want to try using a Matlab gui instead of a simple figure. Then you could try something like this.

Community
  • 1
  • 1
wbest
  • 611
  • 1
  • 6
  • 15
  • Thanks for ur reply. I just want to tell you that ROI is fixed as circle and not selected by user and want mean colour of this region if possible in lab space. – shiva Jan 30 '14 at 19:39
  • Once you have the frame and the location, finding the ROI is trivial. For more information on getting frames in video, look here: http://www.mathworks.com/help/vision/examples/video-display-in-a-custom-user-interface.html – wbest Jan 30 '14 at 20:34
  • Thanks. not sure it should be then called ROI I think its simple circular frame of reference or a marker at the centre of video window – I am infact expecting somthing like this: !i59.tinypic.com/29c3zo2.png – shiva Jan 31 '14 at 04:58