0
I have a code using opencv Raspberry Pi and it is running a pattern recognition loop. In the end I close the script using "Ctrl + X" without any problem! I want to "stop" the graphical processing, perform a function to plot a graph of the recognition information such as position, size and other parameters.
How can I do that?
In the example code I put the function call when it stops. but I was unsuccessful. Function name is "Report_moves
while True:
// outras funções de reconhecimento, loop do processamento
if cv.WaitKey(10) == 27:
break
Relatorio_Movimentos(Parado, Aj_Sup, Aj_Inf, Dir, Esq, Frt, Trs)
cv.DestroyAllWindows()
gpio.cleanup()
Try adding a cv::waitKey(0); after the function that generates the report and before destroying the windows. Maybe the report is running properly but the program closes before you can see the result...
– AndersonBS
Create the Motion_report in a thread. And keep the original application waiting for the breakpoint. If it happens, kill the thread.
– Mansueli