Documentation for extending cscore webpage controls?
Hi - I am pretty impressed with the cscore implementation running on our Raspberry Pi. We are successfully serving a webpage from our RPi at port 8081. I am also able to add OpenCV image operations and view the results on port 8082 (the usbcvstream example).
Part of the use of our camera streams has been for autonomous, which involves OpenCV thresholding of H, S and V around a particular color (mainly green) to focus on targets. I was interested in extending the existing webpage controls by adding min and max sliders for H, S and V. I have found some of the HTML page construction code in mjpegserverImpl.cpp. Is there any documentation you can point me to to add controls to the webpage?
Thanks! Rob
We need to work on some of the documentation. However, the way to add them is pretty straight forward. On the CvSource object, there is an CreateProperty function
https://github.com/wpilibsuite/cscore/blob/master/src/main/native/include/cscore_oo.h#L410
Call that to create new properties, and those will be displayed on the webpage. The returned object is a handle to the property. Call Get() on that to get the current value of that property.
Works great! Thanks for the tip.
Rob