![]() |
image processing using opencv - how to draw on the video
hello, how can I draw on the video in the smart dashboard ? I know how to draw with opencv (imgproc.line , for example) but I dont know how to draw on the video in the smart dashboard.. (to draw, or to show the hsv filter, or any other thing)
how can I do that ? Thanks in advance |
Re: image processing using opencv - how to draw on the video
Have you looked at the Intermediate Vision sample in the example projects? It does exactly that (though it draws a rectangle instead).
|
Re: image processing using opencv - how to draw on the video
Quote:
but if im trying to do more things - and not just a rectangle, so the robot crash after a few seconds (about 2-3 seconds) and the program starts again, and crash.. this is the code Code:
and this is the error Code:
and line 879 is this Code:
you know why its happening and how to fix that ? I thought that it maybe because its "too much" for the roborio, so the code is crashing (and starts again) - because thats happened to me a few days ago, when i tried to take a lot of photos, but i dont think that its the problem now.. |
Re: image processing using opencv - how to draw on the video
Quote:
|
Re: image processing using opencv - how to draw on the video
You're not releasing the temporary HSV and thresh Mats after you're done with them. They use native memory that the JVM doesn't know about, so they don't get garbage collected like normal "pure" Java objects
|
Re: image processing using opencv - how to draw on the video
Quote:
Quote:
|
Re: image processing using opencv - how to draw on the video
Call the release() method on the OpenCV objects after you're done with them. You may also be able to declare them before the loop and re-use them later.
You're also creating new Points and Scalars when you don't need to. They also use native memory. But since they never change, you can declare them before the loop and avoid memory problems |
| All times are GMT -5. The time now is 09:46. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi