Raspcontroller App


I have a Raspberry Pi 3 B+ and i wanted to send the data detected from the Dht11 and the camera module to an android application. RaspController was the best solution to do that and thank you for the video. I created a command to receive the temperature and the humidity from the DHT11 and it works verry well. But when i created a command to run the object detection code who works perfectly on my RPi, i recieve an error on the application about cv2.imshow("Output",img). (error: Can't initialize GTK backend in function 'cvInitSystem'). Do you know how to solve it?



Hi Manoubi,

Welcome to the forum!!

Are you running your Pi headless? If so the .imshow command is trying to draw a window to show the user an output of the object detection, to stop the error appearing you’ll be able to comment out that line :slight_smile:



Hi Liam,

I appreciate your help :slightly_smiling_face:

I am not running my Pi headless and the code runs perfectly. But i think the error is coming from the application.
I am still new with RPi and I did not understand where the error is coming from.

1 Like

See if this helps, Manoubi,

The solution is in this post error: (-2:Unspecified error) Can't initialize GTK backend in function 'cvInitSystem' · Issue #18461 · opencv/opencv · GitHub