Search found 2722 matches

by kwagyeman
Sun Feb 03, 2019 8:36 pm
Forum: Technical Discussion
Topic: I2C gives OSError: [Errno 110] ETIMEDOUT
Replies: 10
Views: 262

Re: I2C gives OSError: [Errno 110] ETIMEDOUT

Have you heard of software serial on the Arduino? It's let's you make a low speed uart on the I/O pins that support interrupts. Pins 2 and 3. Using that library you can have another serial port.
by kwagyeman
Sun Feb 03, 2019 6:46 pm
Forum: Technical Discussion
Topic: Creating USB connection with header pins
Replies: 1
Views: 64

Re: Creating USB connection with header pins

Through the REPL on the hardware UART you can indeed use OpenMV IDE to debug the camera and get images. You have to use the Open Terminal feature in OpenMV IDE and you have to also setup the camera to expose REPL on it's hardware UART on startup. You can do both of these under the tools menu with th...
by kwagyeman
Sun Feb 03, 2019 6:42 pm
Forum: General Topics
Topic: USB and SPI at same time?
Replies: 17
Views: 434

Re: USB and SPI at same time?

Ah, okay, um, getting SPI working is not impossible. I'm not sure what the issues you are having is however.

Okay, um, let me give you a simple script idea that should put you on the right track.

Oh, we will have a CAN shield in stock too for that system. You're doing FIRST right?
by kwagyeman
Sun Feb 03, 2019 6:40 pm
Forum: Technical Discussion
Topic: I2C gives OSError: [Errno 110] ETIMEDOUT
Replies: 10
Views: 262

Re: I2C gives OSError: [Errno 110] ETIMEDOUT

Yeah, that's what it means. The Arduino can't do I2C slave mode as far as I know. Please use the UART on the mega and on the OpenMV Cam to communicate. It's way easier.
by kwagyeman
Sun Feb 03, 2019 1:02 am
Forum: Project Discussion
Topic: Rover One UGV - Assistance Needed with Face Detection
Replies: 8
Views: 175

Re: Rover One UGV - Assistance Needed with Face Detection

I'll add bicubic interpolation. I need to think about how to add it in a nice way however.
by kwagyeman
Sat Feb 02, 2019 9:40 pm
Forum: Project Discussion
Topic: Rover One UGV - Assistance Needed with Face Detection
Replies: 8
Views: 175

Re: Rover One UGV - Assistance Needed with Face Detection

That example won't produce the result above. It will just make the image look muddy. E.g. https://en.wikipedia.org/wiki/Bicubic_interpolation Interpolation typically destroys edges. So, I'm not sure how that image for the thermal camera was made. ... To be clear, I can add an interpolation method fo...
by kwagyeman
Sat Feb 02, 2019 8:52 pm
Forum: Project Discussion
Topic: Rover One UGV - Assistance Needed with Face Detection
Replies: 8
Views: 175

Re: Rover One UGV - Assistance Needed with Face Detection

Okay, so, I've recently added in nearest neighbor A.K.A blocky scaling. So, I can upscale the 8x8 image to whatever res though it still looks like an 8x8 image. I'd be okay adding an interpolate method that works on that up scaled image to clean it up using interpolation loops. Can you provide C cod...
by kwagyeman
Sat Feb 02, 2019 8:15 pm
Forum: General Topics
Topic: Multi threading
Replies: 3
Views: 128

Re: Multi threading

Hi, MicroPython compiles the code into byte code. If you want multi-threading you'll have to wait until it's supported by MicroPython.
by kwagyeman
Sat Feb 02, 2019 3:52 pm
Forum: General Topics
Topic: USB and SPI at same time?
Replies: 17
Views: 434

Re: USB and SPI at same time?

Hi, I don't really have time anymore to debug code like this. If you ask me a clarification question about a line I can help but just giving me a giant code dump is not something I'm able to work on anymore. Um, it's FAR easier just to get async serial working to the Arduino. Use the SoftwareSerial ...
by kwagyeman
Sat Feb 02, 2019 2:39 pm
Forum: General Topics
Topic: openmv serial communication with arduino not working properly
Replies: 6
Views: 117

Re: openmv serial communication with arduino not working properly

Not, these aren't strictly required. They help prevent random data when once device is off however.
by kwagyeman
Sat Feb 02, 2019 2:38 pm
Forum: General Topics
Topic: USB and SPI at same time?
Replies: 17
Views: 434

Re: USB and SPI at same time?

Okay, does the camera work fine when there's no physical connection between the two devices but the SPI code is running on the camera? Also, async serial is much easier to get working on the OpenMV Cam and another device versus SPI.
by kwagyeman
Sat Feb 02, 2019 2:36 pm
Forum: Project Discussion
Topic: Rover One UGV - Assistance Needed with Face Detection
Replies: 8
Views: 175

Re: Rover One UGV - Assistance Needed with Face Detection

Hi, thanks for buying the system. 1. You have to rotate the image if you want to detect faces at different angles. The Haar Face detector is pretty rigid about the face being upright. You can do this in software by doing img.rotation_correction(z_rotation=45) and img.rotation_correction(z_rotation=-...
by kwagyeman
Sat Feb 02, 2019 2:29 pm
Forum: General Topics
Topic: Pan/Tilt + Motorized zoom
Replies: 6
Views: 126

Re: Pan/Tilt + Motorized zoom

Give me a bit then to add this.
by kwagyeman
Sat Feb 02, 2019 1:15 pm
Forum: General Topics
Topic: USB and SPI at same time?
Replies: 17
Views: 434

Re: USB and SPI at same time?

Yes, they both can be used at the same time. If things are not working you are causing some sort of short.
by kwagyeman
Sat Feb 02, 2019 2:18 am
Forum: General Topics
Topic: openmv serial communication with arduino not working properly
Replies: 6
Views: 117

Re: openmv serial communication with arduino not working properly

Um, this should be fine. Your code could be doing anything so I can't tell what your problem is.
by kwagyeman
Sat Feb 02, 2019 2:17 am
Forum: Technical Discussion
Topic: Memory differences between terminal and IDE
Replies: 5
Views: 86

Re: Memory differences between terminal and IDE

Um, that should be all you need. The IDE has a built-in strip white space and comments option when you save the script via tools.
by kwagyeman
Fri Feb 01, 2019 11:51 pm
Forum: General Topics
Topic: openmv serial communication with arduino not working properly
Replies: 6
Views: 117

Re: openmv serial communication with arduino not working properly

Please use P4 a and P5. These are the pins everyone uses. The other part pins are technically supported in hardware but you need to use a different usrt bus that bus 3.
by kwagyeman
Fri Feb 01, 2019 11:49 pm
Forum: Technical Discussion
Topic: Memory differences between terminal and IDE
Replies: 5
Views: 86

Re: Memory differences between terminal and IDE

Yes, the IDE allocates a string for the file and then paraes it so the file has to fit in RAM. When the file is one disk it's parsed line by line which is less ram since it gets turned into byte code immediately. Um, you may wish to minify your libs before saving them to the OpenMV Cam.
by kwagyeman
Fri Feb 01, 2019 6:11 pm
Forum: Technical Discussion
Topic: External SD card access
Replies: 5
Views: 109

Re: External SD card access

@kwiley - Now this is a feature request too far :)
by kwagyeman
Fri Feb 01, 2019 6:09 pm
Forum: Technical Discussion
Topic: uos vs os modules
Replies: 2
Views: 119

Re: uos vs os modules

Um, I think they are the same but use the uio/uos versions. MicroPython specs them instead of the standard ones.
by kwagyeman
Fri Feb 01, 2019 6:08 pm
Forum: General Topics
Topic: Pan/Tilt + Motorized zoom
Replies: 6
Views: 126

Re: Pan/Tilt + Motorized zoom

Um, actually, I plan to add back a method called get_fft_histogram() which can be used to detect the sharpness of an ROI. I wrote the code for someone on the forums before but it never made it into a release. I'm doing firmware updates right now so I'll make this something to fix. Please get a GitHu...
by kwagyeman
Fri Feb 01, 2019 1:22 pm
Forum: General Topics
Topic: Pan/Tilt + Motorized zoom
Replies: 6
Views: 126

Re: Pan/Tilt + Motorized zoom

Hi, this is really easy. You just use find blobs and track the largest blob. Then you have a PID loop on the X/Y and pixels within the blob that control pan, tilt, and zoom. As for the service control we sell a pan and tilt shield that you just have to add power to and a mounting system with the ser...
by kwagyeman
Fri Feb 01, 2019 1:20 pm
Forum: Technical Discussion
Topic: Interface pinout dimensions
Replies: 1
Views: 55

Re: Interface pinout dimensions

Hi, the best way to get that is to download the eagle files and look at the board design. We have a lot of shield boards to use too.
by kwagyeman
Fri Feb 01, 2019 1:37 am
Forum: Technical Discussion
Topic: Artifacts from camera after running CNN and frame differencing
Replies: 13
Views: 311

Re: Artifacts from camera after running CNN and frame differencing

Hi, you're the first customer to actually use this feature that I know of. For the H7 it's going to be much more useful. Anyway, if you have some time and a blog, a write up on like Hacksters would be appreciated. Likez, for example, sharing your idea, but not he implementation.
by kwagyeman
Thu Jan 31, 2019 2:32 am
Forum: Technical Discussion
Topic: Artifacts from camera after running CNN and frame differencing
Replies: 13
Views: 311

Re: Artifacts from camera after running CNN and frame differencing

The issue is that some.of the methods in our code pop the extra allocated fb accidentally causing memory corruption. We have to fix these in a lot of places. Anyway, just save the background images to disk as bmp files and then pass a path to them from difference and the OpenMV Cam will use the disk...
by kwagyeman
Wed Jan 30, 2019 12:38 pm
Forum: Technical Discussion
Topic: Artifacts from camera after running CNN and frame differencing
Replies: 13
Views: 311

Re: Artifacts from camera after running CNN and frame differencing

Okay, will do. I've asked Ibrahim to look at it but I will be able to take a look over the weekend too.
by kwagyeman
Wed Jan 30, 2019 12:36 pm
Forum: Technical Discussion
Topic: Image.copy(): "OSError: Cannot copy to fb!"
Replies: 19
Views: 301

Re: Image.copy(): "OSError: Cannot copy to fb!"

Yeah, that's the best thing to do. With the updates you don't have to do this all the time, but, using the returned reference is the safe test way.
by kwagyeman
Tue Jan 29, 2019 12:43 pm
Forum: Technical Discussion
Topic: Image.copy(): "OSError: Cannot copy to fb!"
Replies: 19
Views: 301

Re: Image.copy(): "OSError: Cannot copy to fb!"

Ah, that's a typo in the docs. It's dealloc_extra_fb() not db.
by kwagyeman
Tue Jan 29, 2019 12:41 pm
Forum: Technical Discussion
Topic: Image.copy(): "OSError: Cannot copy to fb!"
Replies: 19
Views: 301

Re: Image.copy(): "OSError: Cannot copy to fb!"

Okay, it's fixed now. The way I wrote the function is for it to create a new image handle when it runs leaving the other ones stale. I've now updated it to modify the old image handle that point to the same thing. That said, I can't handle all copy types. If you have an image in the frame buffer and...
by kwagyeman
Tue Jan 29, 2019 11:17 am
Forum: Technical Discussion
Topic: gain maxes out at 32
Replies: 2
Views: 58

Re: gain maxes out at 32

It's only 128 for the OV2640. 32 is the max for the OV7725.
by kwagyeman
Tue Jan 29, 2019 2:19 am
Forum: Technical Discussion
Topic: Colour tracking thrown off due to white balance
Replies: 1
Views: 56

Re: Colour tracking thrown off due to white balance

Hi, make the amount of time skip frames runs shorter. If you make the auto functions run for only a short amount of time they barely have an effect. Try 100ms.
by kwagyeman
Tue Jan 29, 2019 2:17 am
Forum: Technical Discussion
Topic: Artifacts from camera after running CNN and frame differencing
Replies: 13
Views: 311

Re: Artifacts from camera after running CNN and frame differencing

Hmm, was resolution are you running at? I know for a fact the frame buffer doesn't respect the frame buffer stack at all. So, it will overwrite it and causes a crash (this is something I will fix soon). The frame buffer stack when pushed does respect what is in the frame buffer and errors out if the...
by kwagyeman
Tue Jan 29, 2019 2:14 am
Forum: Technical Discussion
Topic: Image.copy(): "OSError: Cannot copy to fb!"
Replies: 19
Views: 301

Re: Image.copy(): "OSError: Cannot copy to fb!"

Hmm, dealloc may be called something else. One my phone right now. Please check the py_sensor.c file on GitHub for the method name.

As for the copy issue. Can you elaborate? What particular code has issues? You may be right in that the book filed is not updated correctly.
by kwagyeman
Mon Jan 28, 2019 4:04 pm
Forum: General Topics
Topic: Area changing
Replies: 1
Views: 85

Re: Area changing

Hi, use the pixels() method. If area() is changing like that it means that you are picking up noise pixels which cause the bounding box to grow. Area() is based on the bounding box. pixels() is the number of pixels in the object.
by kwagyeman
Mon Jan 28, 2019 2:07 pm
Forum: Technical Discussion
Topic: M7 5V out?
Replies: 17
Views: 298

Re: M7 5V out?

Um, it's a different circuit. We'll release the schematics soon for it.
by kwagyeman
Mon Jan 28, 2019 2:56 am
Forum: Technical Discussion
Topic: Image.copy(): "OSError: Cannot copy to fb!"
Replies: 19
Views: 301

Re: Image.copy(): "OSError: Cannot copy to fb!"

Um, so, keep in mind I'm only comfortable now opening this feature set up with the H7. The idea of having multiple images in RAM before was not really possible when we first started coding this on the M4. There just wasn't space. The memory architecture behind the scenes is kinda messed up in this r...
by kwagyeman
Mon Jan 28, 2019 12:25 am
Forum: Technical Discussion
Topic: Image.copy(): "OSError: Cannot copy to fb!"
Replies: 19
Views: 301

Re: Image.copy(): "OSError: Cannot copy to fb!"

New copy code is done. copy(roi=(x, y, w, h), x_scale=1.0, y_scale=1.0) You also have crop() and scale() now too which take the same arguments. Now, the big new feature that I added is that when you specify: copy_to_fb for copy you can pass another image as the value and copy will copy the pixels in...
by kwagyeman
Mon Jan 28, 2019 12:19 am
Forum: Technical Discussion
Topic: How can I find minimum area rectangle in binary image?
Replies: 17
Views: 3345

Re: How can I find minimum area rectangle in binary image?

This code has the features you want: # Single Color RGB565 Blob Tracking Example # # This example shows off single color RGB565 tracking using the OpenMV Cam. import sensor, image, time, math threshold_index = 0 # 0 for red, 1 for green, 2 for blue # Color Tracking Thresholds (L Min, L Max, A Min, A...
by kwagyeman
Mon Jan 28, 2019 12:18 am
Forum: General Topics
Topic: Linear Regression on M4
Replies: 5
Views: 125

Re: Linear Regression on M4

We removed the YUV LUT on the M4 and switched to a software version. This freed up a lot of space and we can now re-enable a ton of features.
by kwagyeman
Mon Jan 28, 2019 12:00 am
Forum: Technical Discussion
Topic: RGB channel extraction
Replies: 16
Views: 346

Re: RGB channel extraction

I made draw text support non-integer scaling. Hmmm, will fix. I'm going to work on drawing updates next.

I'll fix this, fix an issue with ellipse drawing at extreme angles, and add the rotated text stuff next.
by kwagyeman
Sun Jan 27, 2019 9:50 pm
Forum: Technical Discussion
Topic: ROI processing
Replies: 2
Views: 80

Re: ROI processing

The best way to do this is to use the copy() method with an ROI to pull out the image patch. Given memory limits this is a challenge if the patch is large. To make this easier I'm redoing the copy operation so you can target larger allocated frame buffers to allow for large images. Otherwise, the on...
by kwagyeman
Sun Jan 27, 2019 7:54 pm
Forum: Technical Discussion
Topic: RGB channel extraction
Replies: 16
Views: 346

Re: RGB channel extraction

I've added this feature now. Just pass rgb_channel=0/1/2 to to_bitmap(), to_grayscale(), to_rgb565(), and to_rainbow() and the methods will use the r/g/b channels respectively for whatever they are doing. For to_rgb565() this means that I zero the other channels (i.e. I only copy the selected one). ...
by kwagyeman
Sun Jan 27, 2019 4:37 pm
Forum: General Topics
Topic: Use FLIR Lepton and Camera toghether on one module
Replies: 17
Views: 951

Re: Use FLIR Lepton and Camera toghether on one module

Hmm, maybe you have a FLIR one older than mine. I can skip the FFC step. It's not really required in the FLIR 1 per say (it is kinda required - good practice). Um, the error they mention there is because of their software package. We had to do a lot of work for the FLIR3 to get around the SPI bus is...
by kwagyeman
Sun Jan 27, 2019 12:20 pm
Forum: Technical Discussion
Topic: Image.copy(): "OSError: Cannot copy to fb!"
Replies: 19
Views: 301

Re: Image.copy(): "OSError: Cannot copy to fb!"

I'm working on making the copy() method better today. Note that I'm not able to fix the memory issue. You just have to call the GC methods for that. But, it will be far more functional once I'm done and it will support scaling and cropping in place.
by kwagyeman
Sun Jan 27, 2019 12:19 pm
Forum: Technical Discussion
Topic: M7 5V out?
Replies: 17
Views: 298

Re: M7 5V out?

Buying a different type of 5V USB cable like a Y cable is probably easier.
by kwagyeman
Sun Jan 27, 2019 11:39 am
Forum: General Topics
Topic: Pan & Tilt shield vs. Servo shield
Replies: 3
Views: 100

Re: Pan & Tilt shield vs. Servo shield

If you want to do an interrupt on an I/O pin to measure thr pulse width of an RC controller you can't do that using the service shield since there's another chip in the way.
by kwagyeman
Sun Jan 27, 2019 11:08 am
Forum: Technical Discussion
Topic: M7 5V out?
Replies: 17
Views: 298

Re: M7 5V out?

Great write up! On the H7 we made this harder however with a new circuit that is an ideal diode to minimize voltage drop so as to allow for batteries to work longer with the H7. When we do another H7 production run we can include some solder pads for 5V. I don't think there's space for holes but we ...
by kwagyeman
Sun Jan 27, 2019 10:24 am
Forum: Technical Discussion
Topic: Image.copy(): "OSError: Cannot copy to fb!"
Replies: 19
Views: 301

Re: Image.copy(): "OSError: Cannot copy to fb!"

I don't think most folks use copy(). Generally, most folks stick to just running methods on ROIs and stay to one frame buffer. Keep in mind every method takes an ROI argument to avoid having to use copy(). Anyway, to prevent heap fragmentation import the gc module, del the one that once you are done...
by kwagyeman
Sun Jan 27, 2019 1:12 am
Forum: General Topics
Topic: Pan & Tilt shield vs. Servo shield
Replies: 3
Views: 100

Re: Pan & Tilt shield vs. Servo shield

I built the shield so that you can power the OpenMV Cam and servos from a battery source along with having direct servo control. This is particularly useful for building a DIY Robocar where you want to measure an input pulse width to dead man switch you robot along with being able to do servo out. T...
by kwagyeman
Sat Jan 26, 2019 3:50 pm
Forum: General Topics
Topic: Use FLIR Lepton and Camera toghether on one module
Replies: 17
Views: 951

Re: Use FLIR Lepton and Camera toghether on one module

Here's the firmware with test outputs.

Go to advanced search