I have one GUI thread and one worker thread. Whenever I signal 'start' from GUI thread the processing starts in worker thread and whenever I signal 'stop' the processing in worker thread stops.
After signalling 'stop' the image has to be refreshed in the GUI,
But the image processing code of start and stop code has been enclosed in a while(1) loop,hence the thread never exits..but only on the application exit.
I need to process the image every 2-3 seconds,hence i have let the thread run thorughout the application.