Search found 2287 matches

by kwagyeman
Sun Aug 05, 2018 3:12 am
Forum: Project Discussion
Topic: Resize template image
Replies: 8
Views: 295

Re: Resize template image

Like, post the code or describe the method call flow.
by kwagyeman
Sun Aug 05, 2018 3:11 am
Forum: Project Discussion
Topic: Resize template image
Replies: 8
Views: 295

Re: Resize template image

Great.

Okay, can you describe to me what you're trying to do and then I can just tell you where to edit the code to minimize your work.
by kwagyeman
Sat Aug 04, 2018 2:26 pm
Forum: Project Discussion
Topic: Resize template image
Replies: 8
Views: 295

Re: Resize template image

Okay, install the build system here and let me know if you can compile the firmware:

https://github.com/openmv/openmv/wiki
by kwagyeman
Sat Aug 04, 2018 12:13 pm
Forum: Project Discussion
Topic: Resize template image
Replies: 8
Views: 295

Re: Resize template image

We need to add a resize method to do this. Right now there's nothing in the library for this.

Would you be comfortable editing the C code? I don't have the bandwidth to add this feature right now.

It's pretty trival to add this.
by kwagyeman
Sat Aug 04, 2018 12:10 pm
Forum: Technical Discussion
Topic: question in use img.findcircle() to find the iris
Replies: 3
Views: 156

Re: question in use img.findcircle() to find the iris

Yes, if you download the build system and tweak anything:

https://github.com/openmv/openmv/wiki

Let me know once you get it installed and I'll walk you through how to add customs methods to the python user interface level.
by kwagyeman
Fri Aug 03, 2018 12:08 pm
Forum: Technical Discussion
Topic: resize the framebuffer with copy function
Replies: 2
Views: 134

Re: resize the framebuffer with copy function

Um, we haven't really added features for that.

Note that for the NN code the heap is the problem that you run out of. There's very little heap on the M7 due to the lower RAM onboard. What's the driver behind this? Maybe Ibrahim can ad something quickly for you.
by kwagyeman
Fri Aug 03, 2018 12:07 pm
Forum: General Topics
Topic: An application for auto-focus
Replies: 12
Views: 1027

Re: An application for auto-focus

Hi, so, I made an algorithm for a poster a while back that provided a 2D FFT of the image. The binary for that is on the forums if you search for "MTF". I don't have time to re-release that again right now however. I have to work on the KickStarter.
by kwagyeman
Thu Aug 02, 2018 6:36 pm
Forum: Technical Discussion
Topic: Fastest serial communication
Replies: 7
Views: 256

Re: Fastest serial communication

Mmm, your scripts look fine. Question, can you profile things and see what the camera is spending it's time on? Also, what model are you using? Is this the M4 or M7?
by kwagyeman
Thu Aug 02, 2018 3:20 pm
Forum: Technical Discussion
Topic: Fastest serial communication
Replies: 7
Views: 256

Re: Fastest serial communication

Hi, the print() sends data over the USB serial port to any application that opens the serial port. Note that you can't use the USB VCP or receive any data with print when OpenMV IDE is using the camera. Anyway: print(img.compress(), end='') Generally is fast. Note that when used with OpenMV IDE you ...
by kwagyeman
Thu Aug 02, 2018 12:27 pm
Forum: General Topics
Topic: An application for auto-focus
Replies: 12
Views: 1027

Re: An application for auto-focus

It's not a user callable method...
by kwagyeman
Thu Aug 02, 2018 11:34 am
Forum: Technical Discussion
Topic: Saving the BAYER raw for sensor calibration
Replies: 9
Views: 458

Re: Saving the BAYER raw for sensor calibration

Hi, our Kickstarter website has not launched yet. ETA is next month. I'm working on media assets and the video right now.
by kwagyeman
Wed Aug 01, 2018 8:56 pm
Forum: Technical Discussion
Topic: Saving the BAYER raw for sensor calibration
Replies: 9
Views: 458

Re: Saving the BAYER raw for sensor calibration

Hi, you can get the exposure with the get_exposure() method... https://github.com/openmv/openmv/blob/master/src/omv/ov7725.c#L443 https://github.com/openmv/openmv/blob/master/src/omv/ov7725.c#L405 Anyway, the exposure is limited by the chip's internal register scales. Exposure is 16-bits. So, you ma...
by kwagyeman
Tue Jul 31, 2018 10:52 am
Forum: Technical Discussion
Topic: question in use img.findcircle() to find the iris
Replies: 3
Views: 156

Re: question in use img.findcircle() to find the iris

Hi, does the find_features() method find the eyes first? Please verify that part works.
by kwagyeman
Tue Jul 31, 2018 1:26 am
Forum: General Topics
Topic: NN_Lenet Example error
Replies: 5
Views: 320

Re: NN_Lenet Example error

That's when we are doing the KickStarter so you can pre-order.
by kwagyeman
Mon Jul 30, 2018 10:32 pm
Forum: General Topics
Topic: NN_Lenet Example error
Replies: 5
Views: 320

Re: NN_Lenet Example error

Lenet does not run on the M7. You'll need the H7 for it. When the H7 comes out everyone will be able to run it.
by kwagyeman
Mon Jul 30, 2018 12:02 pm
Forum: General Topics
Topic: Is that able to use the algorithm module independently?
Replies: 2
Views: 179

Re: Is that able to use the algorithm module independently?

Yes, please use the ImageReader/ImageWriter classes. See the Examples -> Video Recording for some demo scripts. OpenMV IDE can create ImageReader files. See the tutorial documentation about it.
by kwagyeman
Sun Jul 29, 2018 10:23 pm
Forum: Technical Discussion
Topic: lshift and rshift in nn_quantizer
Replies: 4
Views: 196

Re: lshift and rshift in nn_quantizer

This is unbelievably complex. Basically, just read the ARM quantizer script. We basically did not get anywhere until they released it. https://github.com/openmv/openmv/blob/m ... antizer.py
by kwagyeman
Fri Jul 27, 2018 10:43 pm
Forum: Project Discussion
Topic: 4D systems dislpay + camera openmv
Replies: 11
Views: 443

Re: 4D systems dislpay + camera openmv

Okay, so you want something like: pin = Pin('P1', Pin.OUT_PP, Pin.PULL_UP) def wait_sync(): while True: pin .value(0) spi.send(0x88) data = spi.recv(1) pin .value(1) print("%02x" % data) if data == 0x88: break pin .value(0) spi.send(0x88 ^ 0xff) pin .value(1) print ("sync done") Please read the docs...
by kwagyeman
Fri Jul 27, 2018 3:07 pm
Forum: Technical Discussion
Topic: USB HID mode
Replies: 16
Views: 630

Re: USB HID mode

We honestly don't support HID mode. Ibrahim however, added it I think to the firmware but it's not something I believe if operational or tested or that we care even to add... Ibrahim, can you expand on this? Is this feature in the firmware, does it work?
by kwagyeman
Fri Jul 27, 2018 2:09 am
Forum: General Topics
Topic: Will H7 be available in Jan 2019
Replies: 1
Views: 253

Re: Will H7 be available in Jan 2019

I'm launching the KickStarter in September. After funds hit the bank in October manufacturing will begin. Delivery should be before the Chinese new year in Feb.
by kwagyeman
Thu Jul 26, 2018 11:49 am
Forum: Technical Discussion
Topic: Saving the BAYER raw for sensor calibration
Replies: 9
Views: 458

Re: Saving the BAYER raw for sensor calibration

Hi, we don't support saving bayer formats using the file system methods. Instead you have to write it out as a RAW binary file: with open("file.bin", "wb") as f: f.write(img) f.close() All images are treated as byte streams when passed to other micropython methods. So, the file object will just pull...
by kwagyeman
Thu Jul 26, 2018 11:47 am
Forum: Project Discussion
Topic: 4D systems dislpay + camera openmv
Replies: 11
Views: 443

Re: 4D systems dislpay + camera openmv

Hi, did you try the code I posted above? Note that I don't have your screen or even know what the protocol is... so, I'm not really sure how to help you... If you want me to provide some useful answer you kind of need to narrow everything down to "one" line of code which is having the error. From th...
by kwagyeman
Thu Jul 26, 2018 1:18 am
Forum: Project Discussion
Topic: 4D systems dislpay + camera openmv
Replies: 11
Views: 443

Re: 4D systems dislpay + camera openmv

Can you post your code using the code tags? I can't figure out the indentation. Note that by try and catch I mean you can do this: def wait_sync(): while True: data = spi.recv(1) if data == 0: break print("nothing") c = spi.recv(1) if (c != 0 ): spi.send(c) print ("sync done") Note, I don't see any ...
by kwagyeman
Thu Jul 26, 2018 1:10 am
Forum: Technical Discussion
Topic: Script autostart
Replies: 52
Views: 2453

Re: Script autostart

Hi, I got the answer I posted from here: https://stackoverflow.com/questions/32908639/open-pil-image-from-byte-file Unfortunately, I can't really debug this for you more than to point you in the right place. As long as you received the right number of bytes on the Pi side you should have a valid ima...
by kwagyeman
Tue Jul 24, 2018 12:08 pm
Forum: Technical Discussion
Topic: OS ERROR : IMAGE FORMAT IS NOT SUPPORTED
Replies: 1
Views: 169

Re: OS ERROR : IMAGE FORMAT IS NOT SUPPORTED

Can you attach your code? As a file. Or post it using the code tags?
by kwagyeman
Tue Jul 24, 2018 12:07 pm
Forum: Technical Discussion
Topic: Script autostart
Replies: 52
Views: 2453

Re: Script autostart

Hi, the error is coming from your Pi. Not the camera. The code on the camera looks fine.

The issues is the frombuffer call. Please note that the image is in JPG format. So:

Code: Select all

import os
import io
import Image
from array import array

image = Image.open(io.BytesIO(image_data))
image.show()
by kwagyeman
Tue Jul 24, 2018 12:02 pm
Forum: Project Discussion
Topic: 4D systems dislpay + camera openmv
Replies: 11
Views: 443

Re: 4D systems dislpay + camera openmv

Hi, do you have any documentation for the display. I'll take a look.

That said, I'm generally unable to do coding for folks since I'm way to busy... if you send the documentation I'll try to give you a write up of what to do but I wouldn't wait on me for a solution.
by kwagyeman
Mon Jul 23, 2018 1:19 pm
Forum: Project Discussion
Topic: 4D systems dislpay + camera openmv
Replies: 11
Views: 443

Re: 4D systems dislpay + camera openmv

Oh, yeah, that's most likely an STM HAL issue. Just wrap the method with a try and catch stament and retry on an error. See the pixy emulation example script in SPI mode for how to deal with this. I can provide a more detailed answrr later if you need more help. Um, these errors are how the MicroPyt...
by kwagyeman
Mon Jul 23, 2018 1:16 pm
Forum: Technical Discussion
Topic: save before programming
Replies: 3
Views: 201

Re: save before programming

Loading the firmware.bin file through the IDE uses our bootloader code which is the fastest way to load the system. The same dialog box which you can load the dfu file through also will accept he firmware.bin file.
by kwagyeman
Mon Jul 23, 2018 1:14 pm
Forum: Technical Discussion
Topic: Script autostart
Replies: 52
Views: 2453

Re: Script autostart

All the lens specs are on the product page. It's 2.8mm.
by kwagyeman
Sun Jul 22, 2018 1:19 pm
Forum: Project Discussion
Topic: 4D systems dislpay + camera openmv
Replies: 11
Views: 443

Re: 4D systems dislpay + camera openmv

Hi, I thought I answered this a while back. Please see the Examples -> Board Control -> SPI Control Example. It shows how to drive our LCD shield in user space using the SPI code.
by kwagyeman
Sun Jul 22, 2018 1:18 pm
Forum: Technical Discussion
Topic: Script autostart
Replies: 52
Views: 2453

Re: Script autostart

Hi, just do: uart.write(img.compress()) On a valid uart object (see example scripts to make one). Or, alternatively, you can do img.compressed_for_ide() if you're sending the data back to the IDE. Note that the data rate is so high that USB is really the other thing that cuts it for sending video. W...
by kwagyeman
Sun Jul 22, 2018 12:15 pm
Forum: Technical Discussion
Topic: CNN MemoryError
Replies: 4
Views: 270

Re: CNN MemoryError

Um, for the number of layer and image input size I'd try to stick to 32x32 or 24x24 and keep the layer count to about 3 to 4 layers of conv.
by kwagyeman
Sun Jul 22, 2018 10:56 am
Forum: Technical Discussion
Topic: CNN MemoryError
Replies: 4
Views: 270

Re: CNN MemoryError

Ibrahim will get back to you with an answer. The M7 the MP heap is only 128KB. So, your network is bigger than all the heap that we have. Ibrahim will try to give you a good estimate on the size of the net that can fit in the M7. This CNN feature is mostly only going to be possible on the H7 coming ...
by kwagyeman
Sat Jul 21, 2018 12:31 pm
Forum: Technical Discussion
Topic: Any tracker implementation?
Replies: 1
Views: 135

Re: Any tracker implementation?

We just have a detector. If you want to track then you should use the ROI method of find_blobs() to call a new find_blobs() task on each detected blob from an initial find_blobs(). If you'd like to see the functionality increase please help out and submit things we can incorporate into the releases....
by kwagyeman
Sat Jul 21, 2018 12:17 am
Forum: General Topics
Topic: Python3 compatible OpenMV-IDE ...
Replies: 7
Views: 467

Re: Python3 compatible OpenMV-IDE ...

If you forked my repo then you'll be able to create a pull request:

https://help.github.com/articles/about-pull-requests/
by kwagyeman
Fri Jul 20, 2018 10:57 am
Forum: Technical Discussion
Topic: where is main.py ?
Replies: 4
Views: 202

Re: where is main.py ?

? I can't tell... The code we have on github works. So, if you are modifying you should know what you are doing.
by kwagyeman
Fri Jul 20, 2018 1:01 am
Forum: Technical Discussion
Topic: Use the OpenMV cam M7 with CMSIS-NN
Replies: 12
Views: 563

Re: Use the OpenMV cam M7 with CMSIS-NN

This used to be more readable... but, now it's not really. https://github.com/openmv/openmv/blob/master/src/omv/stm32fxxx.ld.S https://github.com/openmv/openmv/blob/master/src/omv/boards/OPENMV3/omv_boardconfig.h#L71 So, the CCM size is 128KB. This stores both the .data and .bss along with the stack...
by kwagyeman
Fri Jul 20, 2018 12:56 am
Forum: General Topics
Topic: Python3 compatible OpenMV-IDE ...
Replies: 7
Views: 467

Re: Python3 compatible OpenMV-IDE ...

Oh, just cd into qtcreator and do git status again.
by kwagyeman
Fri Jul 20, 2018 12:54 am
Forum: Technical Discussion
Topic: where is main.py ?
Replies: 4
Views: 202

Re: where is main.py ?

Hi, main.py is inside the main.c file as a text string. It's only created on bootup if the camera doesn't have an SD card. Um, if you want to bake your code into the camera's firmware and need an SD card you can also just execute methods to open up a new file and write the text string of your main.p...
by kwagyeman
Fri Jul 20, 2018 12:52 am
Forum: Kickstarter Topics
Topic: Pepper plucking using machine vision.
Replies: 1
Views: 270

Re: Pepper plucking using machine vision.

If you have the correct contrast then yes. However, everything is green in that image. So, you'll need a really sophisticated algorithm to get things working.

Um, any shots of what the actual thing you are looking at will look like?
by kwagyeman
Fri Jul 20, 2018 12:49 am
Forum: Project Discussion
Topic: Raspberry Pi Zero + camera vs. OpenMV
Replies: 4
Views: 3411

Re: Raspberry Pi Zero + camera vs. OpenMV

Hi, you're probably going to want to use a Pi if you plan to do all that. The OpenMV Cam is really best suited for small robotic applications where the focus is to build something that works as quickly as possible. From what you sound like you want you're going to want the full desktop computer / pi...
by kwagyeman
Wed Jul 18, 2018 9:30 pm
Forum: General Topics
Topic: PWM
Replies: 2
Views: 159

Re: PWM

Note sure if PWM on PIN 6 works.
by kwagyeman
Wed Jul 18, 2018 9:29 pm
Forum: General Topics
Topic: PWM
Replies: 2
Views: 159

Re: PWM

Have you tried this example code? # PWM Control Example # # This example shows how to do PWM with your OpenMV Cam. import time from pyb import Pin, Timer tim = Timer(4, freq=1000) # Frequency in Hz # Generate a 1KHz square wave on TIM4 with 50% and 75% duty cycles on channels 1 and 2, respectively. ...
by kwagyeman
Wed Jul 18, 2018 9:13 pm
Forum: General Topics
Topic: Python3 compatible OpenMV-IDE ...
Replies: 7
Views: 467

Re: Python3 compatible OpenMV-IDE ...

The newest version is 3.0.0. 1. We already support dilate and erode. https://docs.openmv.io/library/omv.image.html?highlight=dilate#image.image.dilate That's been there forever. We support find blobs for blob finding. We do not support contour finding. The reason for this was a lot of our stack was ...
by kwagyeman
Wed Jul 18, 2018 12:06 pm
Forum: General Topics
Topic: How to do curve fitting on detected blob
Replies: 6
Views: 330

Re: How to do curve fitting on detected blob

Hi, find_blobs() gives you the centroids of things. So, you just need to write scipy.optimize.curve_fit for curve fitting. Please understand the OpenMV Cam is a microcontroller without an OS and doesn't have every feature desktop apps have. That said, the C code is fully programmable if you want to ...
by kwagyeman
Wed Jul 18, 2018 2:05 am
Forum: General Topics
Topic: How to do curve fitting on detected blob
Replies: 6
Views: 330

Re: How to do curve fitting on detected blob

Mmm, so, we really just have that and:

https://docs.openmv.io/library/omv.imag ... regression

Would you be okay with calling get regression on multiple blob clusters to get mx/my values between multiple clusters and then do the rest in python yourself?
by kwagyeman
Tue Jul 17, 2018 5:21 pm
Forum: General Topics
Topic: Run code on prerecorded video
Replies: 1
Views: 121

Re: Run code on prerecorded video

See Examples - video Recording - Image writer.
by kwagyeman
Tue Jul 17, 2018 4:47 pm
Forum: Technical Discussion
Topic: Video Feed
Replies: 1
Views: 118

Re: Video Feed

Hi, the serial protocol is in this script: https://github.com/openmv/openmv/blob/master/tools/pyopenmv.py And this one shows how to use it. https://github.com/openmv/openmv/blob/master/tools/pyopenmv_fb.py Note that you can roll your own custom protocol too and whatnot. You can just send data out th...

Go to advanced search