chrisbuerginrogers / LabVIEWOpenMV

LabVIEW VIs for the OpenMV Camera
2 stars 3 forks source link

Does not work with higher resolution #3

Open mandarin18a opened 3 years ago

mandarin18a commented 3 years ago

Hi, Nice driver. Unfortunately, it will not work at a resolution higher than QVGA. To reproduce, go to OpenMV express, Python tab, chance sensor.set_framesize(QVGA) to sensor.set_framesize(VGA). Connect and run. You will see no image, however, the value in the plot will change. The same with any frame size above QVGA. I use sensor OV5640, board H7. Using OpenMV IDE I can use any resolution.

chrisbuerginrogers commented 3 years ago

I can try and fix this - but if you already have a fix, that would be great. Thanks

mandarin18a commented 3 years ago

Not sure how efficiently I have fixed that, but in ReadOpenMVimage.vi I set 1..320 case as default because the size of everything after QVGA is more than 320. Untitled However, with this, I'm getting another problem. _Main.vi crashes periodically at a frame size bigger than XGA. I would say that this is the cam, but OpenMV IDE runs a 5K frame size without a problem. Thanks.

chrisbuerginrogers commented 3 years ago

I tried everything I could think of - but I think to do it right, I would have to move everything over to RPC like they now have in their app. Sorry. I tried adding some buffer flushing, but no matter what I do, the large size returns always zero - so I never get to the "read image" part. You are right that the case statement eventually would have to be expanded to take 640 as an option - but I get an error on the read size vi (the first element is 0 implying a bad reading). Sorry.

Niklas123Niklas commented 3 years ago

Hi, I am issuing the same problem. Is there any solution in sight? Thanks!

Edit: I looked into the VIs and their behavior a little deeper and it seems that the the third element of size() in ReadOpenMVImage is growing in size depending on the resolution set. WIth SVGA resolution, this value stays stable at around 162000 and starts at 80000. For HVGA it starts at 27000 and is stable at 56000. VGA: Start at 52000 and stop at 105000. XGA is not able to run stable and starts at 121000 and grows until 195000 when it starts showing random numbers. Same as above, with the number increasing with increasing resolution.

So it looks like there is a buffer that has a limited size and some data is accumulating there until a certain point. When the accumulated data is too big, the communications fails, otherwise it goes on. Does this help maybe?

chrisbuerginrogers commented 3 years ago

Yeah - I tried again - I am not sure how to do this without help from people that know more…. I reached out to the OpenMV folks and they agreed it should work - for some reason I keep getting “bad image” - I tried varying the wait time etc - but some buffer somewhere is getting overloaded. If anyone has insight - that would be awesome. Sorry


ph: 617 627 2882 w: https://engineering.tufts.edu/me/people/faculty/chris-rogers Z: https://tufts.zoom.us/my/crogers On Aug 2, 2021, 4:55 AM -0400, Niklas123Niklas @.***>, wrote:

Hi, I am issuing the same problem. Is there any solution in sight? Thanks!

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/chrisbuerginrogers/LabVIEWOpenMV/issues/3#issuecomment-890851222, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABKW7O2F3J66B5AZAVTE32LT2ZMPNANCNFSM45SDX5MQ.

chrisbuerginrogers commented 3 years ago

So there is another option - this seems to work pretty well just over the REPL - I hope that helps. Note that NIVISA does not like new Macs (to be fixed in 2021) so I wrote my own serial comm in python - you can toss that in favor of NIVISA calls.

Niklas123Niklas commented 2 years ago

Hi chris, unfortunately, this does not work for me, but as LabVIEW now supports running python, I use the rpc library to communicate with the openMV camera. Now I run python code to get the images and transfer them as an array to LabVIEW. Thanks for your support. Cheers Niklas

chrisbuerginrogers commented 2 years ago

Great. Please share your code. I would be psyched to see it


ph: 617 627 2882 webhttps://engineering.tufts.edu/me/people/faculty/chris-rogers, calhttps://calendly.com/chrisbuerginrogers, and zoomhttps://tufts.zoom.us/my/crogers

On Mar 14, 2022, at 06:04, Niklas123Niklas @.***> wrote:



Hi chris, unfortunately, this does not work for me, but as LabVIEW now supports running python, I use the rpc library to communicate with the openMV camera. Now I run python code to get the images and transfer them as an array to LabVIEW. Thanks for your support. Cheers Niklas

— Reply to this email directly, view it on GitHubhttps://github.com/chrisbuerginrogers/LabVIEWOpenMV/issues/3#issuecomment-1066592503, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABKW7O7CQYH4RTESRD5WTP3U74FKXANCNFSM45SDX5MQ. You are receiving this because you commented.Message ID: @.***>

Niklas123Niklas commented 2 years ago

Here you go. I use LabVIEW 2020, if you need earlyer version, please feel free to ask and I will save it for another version. I appended .txt to all files to upload them here and not use a ZIP file. The main.py file is the script to be run on the cam, the others are needed for the LabVIEW communication. The script is made to be able to have full manual control for the camera, but those calls can be deleted of course. The scripts are taken from examples of openMV and adapted, the RPC.py is used from openMV as is. Cheers, Niklas

rpc_controller.py.txt Get Image.vi.txt main.py.txt rpc.py.txt

chrisbuerginrogers commented 2 years ago

Great - thanks


ph: 617 627 2882 webhttps://engineering.tufts.edu/me/people/faculty/chris-rogers, calhttps://fantastical.app/crogers-bpB2/meetings-w-chris, and zoomhttps://tufts.zoom.us/my/crogers

On Mar 14, 2022, at 10:40 AM, Niklas123Niklas @.**@.>> wrote:

Here you go. I use LabVIEW 2020, if you need earlyer version, please feel free to ask and I will save it for another version. I appended .txt to all files to upload them here and not use a ZIP file. The main.py file is the script to be run on the cam, the others are needed for the LabVIEW communication. The script is made to be able to have full manual control for the camera, but those calls can be deleted of course. The scripts are taken from examples of openMV and adapted, the RPC.py is used from openMV as is. Cheers, Niklas

rpc_controller.py.txthttps://github.com/chrisbuerginrogers/LabVIEWOpenMV/files/8245695/rpc_controller.py.txt Get Image.vi.txthttps://github.com/chrisbuerginrogers/LabVIEWOpenMV/files/8245696/Get.Image.vi.txt main.py.txthttps://github.com/chrisbuerginrogers/LabVIEWOpenMV/files/8245697/main.py.txt rpc.py.txthttps://github.com/chrisbuerginrogers/LabVIEWOpenMV/files/8245699/rpc.py.txt

— Reply to this email directly, view it on GitHubhttps://github.com/chrisbuerginrogers/LabVIEWOpenMV/issues/3#issuecomment-1066883369, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABKW7O34I2362PQNSL4YWWDU75FVHANCNFSM45SDX5MQ. You are receiving this because you commented.Message ID: @.***>