I have an application where I am using a stereo camera system that inputs one large image from two cameras into Matlab. I take a snapshot and then sparse the image into two images, crop, offset, display, etc using a subroutine ShowImages. I would like to be able to view the images live while I align the system that is collecting them. Currently I am using a while loop that is linked to a toggle switch. When the toggle switch changes the while loop breaks. Although the code seems to work, it is extremely slow. It can take 20 seconds after the switch is changed to off before the system responds. Is there a way to get the system to respond faster?
function CamsLiveSwitchValueChanged(app, event)
app.AquiringImagesLamp.Color = [0 1 0];
app.AquiringImagesLamp.Color = [1 0 0];