New Camera window and Object drawing

I am using the "Newcamera" feature and grabbing images into Igor. I wanted/needed to draw some ROIs on the live image. I tried different methods but I just couldn't do it. I even tried to embed the video as a sub window and stack it under another one so I could try to draw on in and finally overlap them, but unsuccessfully. Is there a way to do it? 

The short answer is no.  The camera window is not an Igor Graph window so you can't use the same tools.  It is designed to allow you to display live images.  If you want to interact with an image, select ROI or perform analysis you need to display a specific captured image in a Graph window.  Note that if you capture images into a single fixed name wave, you can display that wave and it will update when the data in the wave is updated.  Depending on your version of Igor there may be additional tweaks that you can use to improve performance.  Feel free to contact support with more information about your application.

A.G.

 

It seems like you could also use "Modifycamera grabFunctionName=myFunc" with a user-defined function that does something like the following. This function receives the most recent frame as a wave -- perhaps at a lower frame rate than the camera window? -- and so that wave can be appended to graph, providing all the usual drawing and tracing methods for graphs.

strconstant ks_drawGraph = "myDrawingGraph" //name of graph to draw on

//to use:
//1) start a camera (e.g., run: NewCamera)
//2) run: ModifyCamera grabFunctionName=myFunc
function myFunc(frameWave, frameIndex)
 WAVE frameWave
 Variable frameIndex


 if (wintype(ks_drawGraph) == 0) //create graph if it doesn't exist
  display/k=1/n=$ks_drawGraph
  appendimage frameWave
 endif

 //this function should cause the built-in camera to continuously update frameWave?
 //If frameWave is actually a free wave, frameWave would have to be duplicated
 //into a global wave before the if statement

 //can add a check that frameWave is still on ks_drawGraph
end

 

 

In reply to by gsb

I tried something similar by setting a background task and refreshing the wave content every 0.5s. Not a good idea. I am using the ModifyCamera now under user request. Not ideal, but it does the job.

Thank you all for the replies!

In IP8 you can use SetIdlePeriod to affect the speed of updates.  The background process is less than ideal for this application.  Your own procedure should mark the wave as having changed and the shorter idle period should give you a more timely update.