We’re using GRIP for image processing.
auto contours = myGripPipeline.GetFilterContoursOutput();
auto inst = nt::NetworkTableInstance::GetDefault();
auto table = inst.GetTable("datatable");
xEntry = table->GetEntry("centerX");
std::vector<cv::Point> centers;
for (int i = 0; i < contours.size(); i++) {
cv::Rect r = cv::boundingRect(contours);
int centerX = r.x + r.width / 2;
int centerY = r.y + r.height / 2;
centers.push_back(cv::Point(centerX, centerY));
xEntry.SetDouble(centerX);
}
When I run the above code (in RobotInit()), it gives me the following error:
'myGripPipeline' has not been declared
auto contours = myGripPipeline::GetFilterContoursOutput();
I’ve tried other stuff, but it hasn’t worked. Sometimes, it mentions that the scope is an issue. I’m pretty new to this, so I wouldn’t be surprised if the solution was blindingly simple. Thanks.