GRIP
GRIP copied to clipboard
Cannot use "Find Contours" as input to "CV Rectangle"?
Hi Working on the FRC 2016 challenge, we are trying to highlight the targets found by GRIP in our smart dashboard. One would think that a combination of "Find Contours", "CV Rectangle" and "Publish Video" would do the trick but it does not for a few reasons:
- It appears that there is no operation that can take contours as an input except "Publish Contours"
- "CV Rectangle" requires a scalar as input for the color... and it seems that there is no operation that outputs a scalar acceptable as input to "CV Rectangle". At the minimum could you make the color a user-defined value so that one can draw static rectangles on images before publishing them to the smart dashboard? Thanks!
This is probably a good use of the GRIP SmartDashboard plugin
As a note, "Convex Hulls" and "Filter Contours" also take contours as an input.
Thank you! It seems that the GRIP SmartDashboard Extension should work for us.
However, I still think that GRIP itself should support doing what the extensions do...
And regardless, how does one specify the color parameter for CV Rectangle? What step in GRIP produces a scalar value that is suitable as input to CV Rectangle?
Thank you in advance for your reply
@ThomasJClark any idea about how to specify the color for the "CV Rectangle" operation? Thanks!
I don't think you can. CV Rectangle is pretty useless, but @JLLeitschuh wanted to include it.
Hi @JLLeitschuh If one cannot specify the color that is a mandatory parameter to "CV Rectangle", then the step is indeed totally useless but I suppose that either I am missing something... or that the color parameter is supposed to be a user-defined parameter (and that somehow it does not show as so because of a bug in GRIP) isn't it?
We originally wanted to be able to specify color. #51 However, its broken on Linux. Perhaps its been fixed in the newer release of javafx
A color picker would be great, but if not possible simply specifying the color as r,g,b would do too imho. Thanks.
I just reopened #51 It was very, very out of date. That should fix this problem.
Great. So we should get CV Rectangle usable in the next release of GRIP? In a matter of weeks? Thanks!
What is the use case that you hope to achieve using the color picker?
Initially we wanted to draw contours. But because it seems we won't be able to pass the contours to cv rectangle we just want to be able to draw lines using rectangles with one size being zero. We don't really care too much about being able to pick a particular color, but cv rectangle requires that a color be passed as input... Thanks!
While you work on the color picker, I think you should assume a default color for the time being. That way we can at least use the rectangle without the color picker. I'm assuming that's an easy task. I tried to do the same and also noticed there was no way to output contour data. The closest is printContoursReport, but it doesn't have output nodes to plug into the Rectangle.
I have a solution for this that is being worked on with @SamCarlberg
Hi @JLLeitschuh @SamCarlberg Was the solution ever implemented? Thanks!