loading
 
Rotating Camera Image After Modules
Carter from United States  [12 posts]
1 year
Hello,

Our team is having a few problems with camera rotation. We recently decided to place the camera on its side so we now need to rotate the image so that our driver can easily see the field. However, our camera does not support a 90 degree so when I use the Axis Camera module clicking 90 degrees doesn't affect it. I compensated for this by adding a Rotate 90 degree module afterwards which works well for allowing us to isolate the target.

However after using a python program and and doing display variables and lines, the best fit rectangle is still shown in the correct (rotated) orientation, but the camera feed behind it is shown un-rotated. I tried to fix this by adding another rotate module before display variables, but if I do that now the camera feed is the correct orientation, but the best fit rectangle isn't.

I've also played with the math module and while I've had success with pictures that I can select, I haven't had any luck with the camera feed.

I'd be grateful for any advice you may have!

program.robo
Steven Gentner from United States  [261 posts] 1 year
Carter,

The problem is that the Blob_Replace references the Source image and uses that to print the blob replace results ontop of. The source is NOT rotated which is causing the issue.

So, a quick fix is to use a Maker just after the Rotate module to force the Source to be rotated. See attached. (note, you need to enable the Axis module to get new images ... since that ip doesn't work for us I just disabled the module).

Also, you had 2 convex_hull modules ... not sure why.

STeven.
program.robo
Carter from United States  [12 posts] 1 year
Hi STeven,

It works perfectly now. Thank you so much!

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index