Search found 89 matches

by OutoftheBOTS
Wed Jun 06, 2018 12:26 am
Forum: General Topics
Topic: bug in b_or
Replies: 12
Views: 2005

Re: bug in b_or

Question, you do know binary can take multiple colors to threshold at the same time right?
No I didn't but I do now. What's the syntax to do this??
by OutoftheBOTS
Tue Jun 05, 2018 6:20 pm
Forum: Technical Discussion
Topic: findcountours and minAreaRect
Replies: 5
Views: 739

Re: findcountours and minAreaRect

Thanks I will have a play with it :)
by OutoftheBOTS
Tue Jun 05, 2018 6:11 pm
Forum: General Topics
Topic: bug in b_or
Replies: 12
Views: 2005

Re: bug in b_or

Thanks for spending so much of your time helping me with my requests.

Another great thing about binary images is they use so little memory you can afford to have many of them even in a constrained environment like a MCU
by OutoftheBOTS
Tue Jun 05, 2018 6:07 pm
Forum: Technical Discussion
Topic: findcountours and minAreaRect
Replies: 5
Views: 739

Re: findcountours and minAreaRect

Yes find blob will find bounding rectangle of all blobs but I want to find minAreaRect i.e to rotation on the rect as well as it's position

see first 2 mins of this video https://www.youtube.com/watch?v=o2ul4KrLT-s&t=1s
by OutoftheBOTS
Tue Jun 05, 2018 5:59 pm
Forum: Technical Discussion
Topic: findcountours and minAreaRect
Replies: 5
Views: 739

findcountours and minAreaRect

Does OpenMV have similar functions as findContours and minAreaRect as found in OpenCV.

It is for another project that I have not yet started but plan to.

See first 2 mins of this video https://www.youtube.com/watch?v=o2ul4KrLT-s&t=1s
by OutoftheBOTS
Tue Jun 05, 2018 5:25 pm
Forum: General Topics
Topic: bug in b_or
Replies: 12
Views: 2005

Re: bug in b_or

For this project I am recreating a Rubik's Cube solving robot that I built with OpenCV. I need to be able to read the colours of the tiles on the Rubik's cube. I do this by thresholding each colour to remove all other data but that colour then I join all binary images together using or to give me 1 ...
by OutoftheBOTS
Tue Jun 05, 2018 4:04 am
Forum: General Topics
Topic: bug in b_or
Replies: 12
Views: 2005

bug in b_or

There seems to be a bug in the b_or see my short explanation video https://youtu.be/qMNy7C22hzY
by OutoftheBOTS
Tue Jun 05, 2018 3:08 am
Forum: General Topics
Topic: setting which fb is displayed in IDE
Replies: 14
Views: 1860

Re: setting which fb is displayed in IDE

Great that's perfect. I am now cooking with gas, time to tap out some code
by OutoftheBOTS
Tue Jun 05, 2018 12:31 am
Forum: General Topics
Topic: setting which fb is displayed in IDE
Replies: 14
Views: 1860

Re: setting which fb is displayed in IDE

Thank you I am now getting much further, it is displaying what I want in the open terminal. What's the best way for writing programs and running them in the Open terminal. What I just did now was wrote my script in note++ then saved it to the USB drive then in the Open terminal repl I type import fi...
by OutoftheBOTS
Mon Jun 04, 2018 10:22 pm
Forum: General Topics
Topic: setting which fb is displayed in IDE
Replies: 14
Views: 1860

Re: setting which fb is displayed in IDE

Something is still wrong because I don't see a binary image for 200ms here is my output https://www.youtube.com/watch?v=O5Cj_tFPke8&feature=youtu.be from this simple test script while True: clock.tick() img = sensor.snapshot() new_fb = img.binary([white_threshold], to_bitmap=True, copy=True) print(n...
by OutoftheBOTS
Mon Jun 04, 2018 5:13 pm
Forum: General Topics
Topic: setting which fb is displayed in IDE
Replies: 14
Views: 1860

Re: setting which fb is displayed in IDE

If I use compressed method instead of compress_fro_ide it no longer gets an error but I don't seem to be able to display it in the ide. This is my output from following script https://www.youtube.com/watch?v=HbNfI36FkcM&feature=youtu.be time.sleep(200) gives sleep of 0.2 here is the script for the o...
by OutoftheBOTS
Mon Jun 04, 2018 4:48 pm
Forum: General Topics
Topic: setting which fb is displayed in IDE
Replies: 14
Views: 1860

Re: setting which fb is displayed in IDE

Just starting to play with displaying a different fb in the IDE. I get error from print statement can't compress in place from this script img = sensor.snapshot() new_fb = img.binary([white_threshold], copy=True, to_bitmap=True) print(new_fb.compress_for_ide(), end="") time.sleep(0.2)
by OutoftheBOTS
Mon Jun 04, 2018 4:39 pm
Forum: General Topics
Topic: find_rects seems to have broken
Replies: 2
Views: 890

Re: find_rects seems to have broken

It was after the firmware update that I noticed it. You can see by the script that I wasn't using any of the updated features.
by OutoftheBOTS
Mon Jun 04, 2018 4:16 am
Forum: Technical Discussion
Topic: Differentiating blob size
Replies: 1
Views: 505

Re: Differentiating blob size

Hopefully I can help you here. something like this should find the biggest rect blob img = sensor.snapshot() biggest = [0,0,0,0] for blob in img.find_blobs([threshold], pixels_threshold=100, area_threshold=100, merge=True, margin=10): current = blob.rect() if current[2] * current[3] > biggest[2] * b...
by OutoftheBOTS
Mon Jun 04, 2018 3:09 am
Forum: General Topics
Topic: find_rects seems to have broken
Replies: 2
Views: 890

find_rects seems to have broken

I was using find_rects and it was working well but all of a sudden it seems to broken. See this output https://youtu.be/KmAQoE-Q7RY From this simple test script import sensor, image, time sensor.reset() sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.QQVGA) sensor.skip_frames(time = ...
by OutoftheBOTS
Mon Jun 04, 2018 2:23 am
Forum: General Topics
Topic: multi coies of an image
Replies: 20
Views: 2378

Re: multi coies of an image

I have uploaded new firmware :)

I don't quite understand the syntax for using this.

I tried this but it got an error OS can't convert bitmap in place

Code: Select all

new_binary = img.binary([white_threshold], to_bitmap=True)
by OutoftheBOTS
Mon Jun 04, 2018 2:07 am
Forum: General Topics
Topic: multi coies of an image
Replies: 20
Views: 2378

Re: multi coies of an image

Thank you very much. I will sit down tonight and have a play with it :)
by OutoftheBOTS
Sun Jun 03, 2018 3:05 am
Forum: General Topics
Topic: setting which fb is displayed in IDE
Replies: 14
Views: 1860

Re: setting which fb is displayed in IDE

Thanks :)
by OutoftheBOTS
Sun Jun 03, 2018 12:09 am
Forum: General Topics
Topic: setting which fb is displayed in IDE
Replies: 14
Views: 1860

Re: setting which fb is displayed in IDE

Thanks I just watched the video and this should do what I need even though it is a little work around :)
by OutoftheBOTS
Sun Jun 03, 2018 12:02 am
Forum: Project Discussion
Topic: Lego Mindstorms support
Replies: 2
Views: 1513

Re: Lego Mindstorms support

I am happy to help where I can and I think this project is a great project and the more cameras you sell the lower the price for everyone and the more development will be supported. Obviously the OpenMV software side of this is only writing a short script to make these features available as a slave ...
by OutoftheBOTS
Sat Jun 02, 2018 6:16 pm
Forum: Project Discussion
Topic: Lego Mindstorms support
Replies: 2
Views: 1513

Lego Mindstorms support

This is just an idea for OpenMV to think about. The Lego Mindstorms is a very very large community that is also used to paying Lego prices for their hardware. There has been a couple of after market machine vision cams released for minstorms. NXTcam was the most liked and pixy cam have a Lego interf...
by OutoftheBOTS
Sat Jun 02, 2018 5:51 pm
Forum: General Topics
Topic: setting which fb is displayed in IDE
Replies: 14
Views: 1860

Re: setting which fb is displayed in IDE

Ok I will have a play with print(extra_fb.compress_for_ide(), end="") Is there a way to disable that when I call shapshot that the IDE will display the image in the main fb? What is best if instead of disabling the IDE show the image in main fb when snapshot is called is if I can set a pointer to wh...
by OutoftheBOTS
Sat Jun 02, 2018 1:08 am
Forum: General Topics
Topic: multi coies of an image
Replies: 20
Views: 2378

Re: multi coies of an image

Thanks a lot.

You guys obviously work very hard to provide this amazing support for your users.
by OutoftheBOTS
Fri Jun 01, 2018 6:33 pm
Forum: Technical Discussion
Topic: adding support for display binary in IDE
Replies: 1
Views: 580

adding support for display binary in IDE

At the moment if I turn a fb into binary using the following code

Code: Select all

    img = sensor.snapshot()
    img.gaussian(1)
    img.binary([white_threshold]).erode(1).to_bitmap()
Then this fb will no longer display in the IDE. Can displaying binary images in the IDE be added??
by OutoftheBOTS
Fri Jun 01, 2018 6:30 pm
Forum: General Topics
Topic: setting which fb is displayed in IDE
Replies: 14
Views: 1860

setting which fb is displayed in IDE

Ok if I make a copy if the fb using following code

Code: Select all

extra_fb = sensor.alloc_extra_fb(sensor.width(), sensor.height(), sensor.RGB565)
extra_fb.replace(img)
I then do some processing of this copy and I want to display the copy in the IDE for some debug how can I do this??
by OutoftheBOTS
Fri Jun 01, 2018 6:09 pm
Forum: General Topics
Topic: multi coies of an image
Replies: 20
Views: 2378

Re: multi coies of an image

It seems that coping the RGB565 image to new fb then doing binary threashold then to_bitmap and make another copy lowers the fps a lot. extra_fb.replace(img) red = extra_fb.binary([red_threshold]).erode(1).to_bitmap(copy=True) The above code does many steps: 1. makes a copy of the RGB565 fb 2. does ...
by OutoftheBOTS
Fri Jun 01, 2018 1:27 am
Forum: General Topics
Topic: multi coies of an image
Replies: 20
Views: 2378

Re: multi coies of an image

Hi, you only need 1 extra frame buffer as far as I understand. You just copy the source image to that buffer. Binarize it. Then convert it to a bitmap. Then copy the source in back in there again and do the process again for the next color threshold. Ahh yes I never though fo doing that :) That sai...
by OutoftheBOTS
Thu May 31, 2018 5:01 pm
Forum: General Topics
Topic: multi coies of an image
Replies: 20
Views: 2378

Re: multi coies of an image

Here is a short video of it in action just using 1 binary copy with just red threasholding see https://youtu.be/uYRjtVvWCTc and here is the code that was running to make that video import sensor, image, time, mjpeg sensor.reset() sensor.set_pixformat(sensor.RGB565) # grayscale is faster (160x120 max...
by OutoftheBOTS
Thu May 31, 2018 4:55 pm
Forum: General Topics
Topic: multi coies of an image
Replies: 20
Views: 2378

Re: multi coies of an image

I see. Then you need to allocate a new frame buffer. Copy the image to that and then binarize it and then convert it to a bitmap per image you want to work on. Yes this is the only way it can be done with current firmware. The trouble with doing it like this is it require a lot of memory because I ...
by OutoftheBOTS
Thu May 31, 2018 3:13 am
Forum: General Topics
Topic: Changing directly video saves too
Replies: 8
Views: 1554

Re: Changing directly video saves too

OpenMVIDE.ini did not have any [OpenMVFFMPEG] tag at all. Once I added the 2 lines of code to the ini file then everything worked fine :)
by OutoftheBOTS
Thu May 31, 2018 2:45 am
Forum: General Topics
Topic: multi coies of an image
Replies: 20
Views: 2378

Re: multi coies of an image

Ok the adding the .to_bitmap(copy=True) to the end doesn't do what I need because as well as making a copy it still alters the original image. This is what I want to do: have the original RGB565 image then make binary copies of the image with different thresholds but leave the original RGB565 image ...
by OutoftheBOTS
Thu May 31, 2018 1:58 am
Forum: General Topics
Topic: Changing directly video saves too
Replies: 8
Views: 1554

Re: Changing directly video saves too

Windows 10 terminates the IDE before I can press anything. Windows 10 doesn't like programs that try access directories it wants secure. Windows 10 is a bit of a pain in the butt at times it doesn't like to play nice. I have had this problem before with other programs. If the IDE was to instead try ...
by OutoftheBOTS
Thu May 31, 2018 1:53 am
Forum: General Topics
Topic: multi coies of an image
Replies: 20
Views: 2378

Re: multi coies of an image

I have just had a quick play with .to_bitmap(copy=True) but am unable to understand the correct syntax to use it.

Seeing my short script in earlier post how would I go about implementing .to_bitmap(copy=True) to achieve the same outcome?
by OutoftheBOTS
Thu May 31, 2018 1:28 am
Forum: General Topics
Topic: Changing directly video saves too
Replies: 8
Views: 1554

Re: Changing directly video saves too

I make a short video for you to see https://youtu.be/DlMzE2GRgvw
by OutoftheBOTS
Wed May 30, 2018 11:45 pm
Forum: General Topics
Topic: Changing directly video saves too
Replies: 8
Views: 1554

Changing directly video saves too

I want to record some of the FB stream in OpenMV IDE. If I use the record button at top right corner of IDE when I press stop it tries to save the output to the program folder and this causes windows to shutdown OpenMV IDE. Is there anywhere I can change the place it tries to save otherwise the Open...
by OutoftheBOTS
Wed May 30, 2018 11:06 pm
Forum: General Topics
Topic: multi coies of an image
Replies: 20
Views: 2378

Re: multi coies of an image

OK I have used sensor.alloc_extra_fb to create a copy of the image for processing see below code. I commonly use thresholding binary images to find what I am looking for in images for my robotics projects. I am quite often looking for a number of things in the image so want to create a number of bin...
by OutoftheBOTS
Wed May 30, 2018 4:13 am
Forum: Technical Discussion
Topic: Using OpenMV camera with normal python 3 ?
Replies: 4
Views: 1076

Re: Using OpenMV camera with normal python 3 ?

I just followed your links and have a question.

In pyopenmv_fb.py the line of code what is script? Is it a file containing the python script??

Code: Select all

pyopenmv.exec_script(script)
by OutoftheBOTS
Wed May 30, 2018 3:57 am
Forum: General Topics
Topic: multi coies of an image
Replies: 20
Views: 2378

Re: multi coies of an image

OK that for your reply. I have started to play with Micropython on the ESP8266 and now ESP32 with psRAM so have started to get used to the confined RAM of MicroPython compared to RPi. The ESP32 has an option for psRAM (i use a 4mb psRAM board myself) and this allows for image manipulation that isn't...
by OutoftheBOTS
Tue May 29, 2018 4:29 am
Forum: General Topics
Topic: multi coies of an image
Replies: 20
Views: 2378

multi coies of an image

Hi there I am new to the OpenMV cam but have done a couple of projects with OpenCV on RPi. First of all a big thanks to the creators of this project for all the work they have done to create such an awesome product. I have a OpenMV M7 cam and I want to be able to take a RBG565 image and take a copy ...

Go to advanced search