We are using this tutorial to set up JeVois using GRIP
When we copy our GRIP constants over to PythonSandbox.py, we get this error:
The PythonSandbox.py __find_counters method is expecting 3 values, but it’s only receiving 2, but as far as we can tell, the method is passing 3 values. The tutorial does not go in dept on this, as this issue is unexpected.
If anyone has any experience with OpenCV and Python, our programmers are stuck.
Here is our PythonSandbox.py file:
PythonSandbox.py
import libjevois as jevois
import cv2
import numpy as np
## Simple example of image processing using OpenCV in Python on JeVois
#
# This module is a basic FRC vision process.
#
# By default, it first gets an image, blurs it, extracts the green channel, thresholds that, and uses the threshold to place
# a mask over the initial image. It then runs an HSV filter on the masked image, erodes and dilates the result, and finally
This file has been truncated. show original
Thanks for any assistance you can provide!
This is likely caused by a difference in the version of OpenCV used in GRIP and the JeVois.
JeVois is currently on OpenCV 4.0.0.
If you look at line 378, it is part of a set of lines that include
im2, contours, hierarchy = cv2.findContours(input, mode=mode, method=method)
I had the same error when I tried running our code from previous years on the new JeVois image.
I fixed it by simply dropping the “im2”.
So, try this:
contours, hierarchy = cv2.findContours(input, mode=mode, method=method)
OP here,
Late follow up, but thank you that solved our issue!