Im wondering if it is possible to generate a "model" from typical openCV functions. For example, I have a Jetson Nano hooked up to a raspberry pi camera that runs a python script that uses the following OpenCV functions:
cvtColor()
GaussianBlur()
threshold()
findContours()
moments()
HoughLines()
I have an OAK camera to play with and I was wondering if its worth spending time trying to get this python function to run on the OAK camera. From what I can tell the camera is focused on NN models which this program definitely isn't although they do have extremely similar inputs and outputs.
In general I am wondering if it is possible to convert non NN or ML models to the .blob format and then run them on the OAK cameras.
Thanks!

  • erik replied to this.

    Hi Bencarn ,
    I think this really depends on the math/logic behind these functions. cvtColor can be done with ImageManip node, GaussianBlur and threshold should be trivial, while finding contours might be really tricky to implement (to be honest I am not sure how it's implemented in the opencv). Not sure about moments and HoughLines, as I am not aware of them. Thoughts?
    Thanks, Erik

    Thats kind of what I figured, that I would have to find other functions to replace these functions and it is not possible to just take a normal python file only using OpenCV and normal python libraries and convert it. Please correct me if I'm wrong but thats ok for now. Thanks!

    • erik replied to this.

      Hi Bencarn ,
      Yes that's correct for the RVC2 as it's an embedded system. For RVC3 (and later) there will be ARM with Linux on there, so it will be easy to implement such custom code (like opencv).
      Thanks, Erik

        9 months later

        Hi erik, are there any documents to use opencv functions to the RVC3 now?

        • erik replied to this.

          Hi HiramZhou ,
          Since its running arm, you can directly pip install the opencv and use it in python scripts on the rvc3. Thouhgts?