Search found 107 matches

by kwiley
Sun Jan 27, 2019 12:08 pm
Forum: Technical Discussion
Topic: M7 5V out?
Replies: 17
Views: 3473

Re: M7 5V out?

If you have any thoughts at all on how to access the 5V on the H7, please let me know. I have access to a professional circuit-builder. He's...kinda incredible, so he can handle any soldering task I throw at him if there is even a merely schematic way to accomplish the hack. Of course, I suppose I c...
by kwiley
Sun Jan 27, 2019 12:04 pm
Forum: Technical Discussion
Topic: Image.copy(): "OSError: Cannot copy to fb!"
Replies: 19
Views: 3193

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

Ah, I did something similar on a PyBoard project, manually triggering the GC at optimal times. I haven't tried that on my M7 code yet. It had crossed my mind as something to try, but I avoided it because, of course in theory, we shouldn't be calling the GC our own, so I feel "guilty" doing it. :-D I...
by kwiley
Sun Jan 27, 2019 4:17 am
Forum: Technical Discussion
Topic: Image.copy(): "OSError: Cannot copy to fb!"
Replies: 19
Views: 3193

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

I realize you have admitted this is upcoming work, but I'm still curious if I'm "doing something wrong". I am getting consistent heap errors after my program runs for a minute or two. This isn't surprising since it repeatedly stomps all of the memory as it copies out an ROI from the sensor's latest ...
by kwiley
Sun Jan 27, 2019 2:25 am
Forum: Technical Discussion
Topic: M7 5V out?
Replies: 17
Views: 3473

Re: M7 5V out?

So I started by identifying the correct contact point. This photo indicates the 5V line of the USB (which would make for a much more challenging mod, as the attachment is minuscule and tucked into the board's circuitry) and the 5V anode of the diode (which is somewhat larger and considerably more is...
by kwiley
Sun Jan 27, 2019 1:53 am
Forum: General Topics
Topic: Pan & Tilt shield vs. Servo shield
Replies: 3
Views: 2672

Re: Pan & Tilt shield vs. Servo shield

Hmmm, so the servo shield can't read a given servo's position but the P&T can?
by kwiley
Sun Jan 27, 2019 1:04 am
Forum: General Topics
Topic: Pan & Tilt shield vs. Servo shield
Replies: 3
Views: 2672

Pan & Tilt shield vs. Servo shield

I saw the various posts about these shields, read their descriptions, and looked over their pinouts a bit. I think the similarities and differences are fairly clear at this point. If I understand correctly, the P&T shield drives up to three servos directly off the PWM GPIO pins and the Servo shield ...
by kwiley
Fri Jan 25, 2019 2:14 pm
Forum: Technical Discussion
Topic: M7 5V out?
Replies: 17
Views: 3473

Re: M7 5V out?

Ah, thanks! After you pointed me to the diode, I quickly found the correct contact with the multimeter. It's even one of the contacts toward the edge of the board instead of toward the middle (anode #2 according to the diode's datasheet). That will be a pretty easy connection to make. Sorry for all ...
by kwiley
Fri Jan 25, 2019 1:10 pm
Forum: Technical Discussion
Topic: M7 5V out?
Replies: 17
Views: 3473

Re: M7 5V out?

I was talking to my electronics buddy about the proposal of tapping into the USB 5V line and he asked why I couldn't just get 5V off of VIN while the USB power is plugged in. I told him it was my understanding that the VIN pin only operates as an alternate incoming power source to the M7, but not th...
by kwiley
Mon Jan 21, 2019 6:53 pm
Forum: Technical Discussion
Topic: Image.copy(): "OSError: Cannot copy to fb!"
Replies: 19
Views: 3193

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

As an extra feature, it would be cool to run pooling and copy at the same time so as to perform ROI extraction and downsampling simultaneously. Currently, copy() doesn't have a pooling option and the pooling functions don't have an ROI option. Either approach could work in theory, although one might...
by kwiley
Mon Jan 21, 2019 6:49 pm
Forum: Technical Discussion
Topic: Image.copy(): "OSError: Cannot copy to fb!"
Replies: 19
Views: 3193

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

As a follow-up, is there any way to give Image.copy() a preallocated heap array to copy into? I could do this manually via get_pixel() by placing extracted pixels from an ROI into a preallocated array, but I obviously want to use Image.copy() for speed.
by kwiley
Mon Jan 21, 2019 6:47 pm
Forum: Technical Discussion
Topic: Image.copy(): "OSError: Cannot copy to fb!"
Replies: 19
Views: 3193

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

I'm getting heap allocation errors when I try to extract an ROI from the sensor image. I don't need the primary image at this point, only the ROI, so I figured I'd run the copy() back into the frame buffer (I presume I would have to call sensor.snapshot() after a frame buffer Image.copy() to get the...
by kwiley
Sun Jan 20, 2019 5:08 pm
Forum: Technical Discussion
Topic: SPI maximum message length
Replies: 2
Views: 986

Re: SPI maximum message length

Hmmm, but even 64k is huge compared to the problem I'm having. Okay, I'll assume it isn't originating on the OpenMV side of the connection then. Thanks.
by kwiley
Sun Jan 20, 2019 10:41 am
Forum: Technical Discussion
Topic: RGB channel extraction
Replies: 20
Views: 9173

Re: RGB channel extraction

:) The thing I find most intriguing is the possibility of writing my own compiled libraries and accessing them from a Python driver. The platform as a whole is very appealing. I'll just have to find the time.
by kwiley
Sun Jan 20, 2019 3:38 am
Forum: Technical Discussion
Topic: SPI maximum message length
Replies: 2
Views: 986

SPI maximum message length

This is a pretty low-level question. I'm not sure anyone will know the answer, but is there an upper-limit on the length of a message sent over a single SPI transfer? I'm seeing dropouts and they appear to occur close to the very suspicious message length of 512 bytes. I'm not yet sure if the error ...
by kwiley
Sun Jan 20, 2019 1:38 am
Forum: Technical Discussion
Topic: RGB channel extraction
Replies: 20
Views: 9173

Re: RGB channel extraction

Ugh, not Mac native, huh? I'll see how far I can get, but to be honest, I'm disinclined to fully install Linux on my Mac just for this purpose when I don't otherwise use Linux very much. I installed Linux on a Mac once (admittedly it was in 1998; perhaps it's easier now) and the experience left seri...
by kwiley
Sun Jan 20, 2019 1:32 am
Forum: General Topics
Topic: Typo in docs
Replies: 2
Views: 2674

Re: Typo in docs

Done. Glad to help.
by kwiley
Sat Jan 19, 2019 8:01 pm
Forum: General Topics
Topic: Typo in docs
Replies: 2
Views: 2674

Typo in docs

image.max(image[, mask=None])
Returns the minimum image of two images pixel-wise.
This section was obviously written by copy/pasting the documentation for the min function and forgetting to make the relevant change.

Cheers!
by kwiley
Sat Jan 19, 2019 2:21 pm
Forum: Technical Discussion
Topic: RGB channel extraction
Replies: 20
Views: 9173

Re: RGB channel extraction

There are lots of image processing algorithms that operate on the RGB channels separately, although in my case I'm less interested in per-channel image manipulations (levels or something like that) and more interested in ML applications on a per channel basis. For example, I might want to train and ...
by kwiley
Sat Jan 19, 2019 12:28 pm
Forum: Technical Discussion
Topic: RGB channel extraction
Replies: 20
Views: 9173

Re: RGB channel extraction

Oh, and it looks like the RGB/Lab conversion is on a single pixel, so it would still involve iterating over get_pixel(). I don't think I can do a Lab transformation on the entire image like image.to_grayscale(), to_rgb565, and to_rainbow().
by kwiley
Sat Jan 19, 2019 12:22 pm
Forum: Technical Discussion
Topic: RGB channel extraction
Replies: 20
Views: 9173

RGB channel extraction

There's a grayscale conversion function, but I don't see a channel extraction function. At the current time, would get_pixel() be the only approach? I realize Lab does something like this, but I was just thinking about raw channel extraction...actually, now that I just wrote the word raw, I'm wonder...
by kwiley
Sat Jan 19, 2019 12:17 pm
Forum: Technical Discussion
Topic: Is midpoint pooling median pooling, and why no max pooling?
Replies: 3
Views: 947

Re: Is midpoint pooling median pooling, and why no max pooling?

That's more than sufficient. No need to add a function if parameters to an existing function serve the purpose. I just overlooked the feature. Thanks.
by kwiley
Sat Jan 19, 2019 12:13 pm
Forum: Technical Discussion
Topic: M7 5V out?
Replies: 17
Views: 3473

Re: M7 5V out?

That would be a great half-way solution. Anyone can stick a wire through a via, but solder-hacking the teeny USB connections is a different level of involvement for some folks.
by kwiley
Sat Jan 19, 2019 12:10 pm
Forum: Technical Discussion
Topic: GPIO on P6
Replies: 6
Views: 1354

Re: GPIO on P6

Yes, but I'm lazy! :D
by kwiley
Sat Jan 19, 2019 11:25 am
Forum: Technical Discussion
Topic: GPIO on P6
Replies: 6
Views: 1354

Re: GPIO on P6

I'm quite certain that what's going on is I'm doubling up on the LCD's backlight control by accident. I realize there is some discussion elsewhere about disabling the backlight control pin to provide an additional GPIO, but even without doing that, the pin can still be used as a switch, but only in ...
by kwiley
Sat Jan 19, 2019 3:26 am
Forum: Technical Discussion
Topic: Is midpoint pooling median pooling, and why no max pooling?
Replies: 3
Views: 947

Is midpoint pooling median pooling, and why no max pooling?

Does midpoint pooling simply imply median pooling? If not, what exactly does it do? Also, may I request (with low priority) max pooling as opposed to mean pooling. Max pooling is a staple of computer vision algorithms. Just throw it waaaaay back in your to-do list. I would never intend such requests...
by kwiley
Sat Jan 19, 2019 2:48 am
Forum: Technical Discussion
Topic: Fill LCD when using small image?
Replies: 1
Views: 691

Fill LCD when using small image?

If you set the sensor to a very small size (e.g. QQQVGA), then it doesn't fill the LCD in either dimension. I realize the aspect ratio is wrong and so either black bars or cropping would be required, but you still don't have to suffer black bars on both axes. That's a waste of space. Is there a way ...
by kwiley
Sat Jan 19, 2019 2:40 am
Forum: General Topics
Topic: Retrieve crop/ROI subimage of Image
Replies: 3
Views: 2438

Re: Retrieve crop/ROI subimage of Image

Thank. I'm sure I'll get to the point where I push my routines down to lower levels, but at the tinkering stage, that would be a premature optimization. I don't yet know which methods I'll need. Right now, my bottleneck appears to be secondary SPI devices, so nothing much of the Python running on th...
by kwiley
Fri Jan 18, 2019 7:49 pm
Forum: Technical Discussion
Topic: GPIO on P6
Replies: 6
Views: 1354

Re: GPIO on P6

It could also be this Chinese knock off board I'm working with. I already pointed out that the darn LED is soldered on wrong. :D
by kwiley
Fri Jan 18, 2019 4:12 pm
Forum: General Topics
Topic: Retrieve crop/ROI subimage of Image
Replies: 3
Views: 2438

Re: Retrieve crop/ROI subimage of Image

I see get_pixel(), but is there a fast way to grab runs of adjacent pixels?
by kwiley
Fri Jan 18, 2019 4:09 pm
Forum: General Topics
Topic: Retrieve crop/ROI subimage of Image
Replies: 3
Views: 2438

Retrieve crop/ROI subimage of Image

There isn't a routine for retrieving a cropped portion (ROI) of an Image into a new Image, or an obvious way to pull a byte array out of an Image. I don't want to use sensor windowing. I want to display the larger image retrieved from the camera and only process a subportion in other ways. Ultimatel...
by kwiley
Fri Jan 18, 2019 3:43 pm
Forum: Technical Discussion
Topic: M7 5V out?
Replies: 17
Views: 3473

Re: M7 5V out?

As I've said before, I'm not specifically urging any design changes, much less extra work, unless the broader community sees utility in such requests.

Thanks.
by kwiley
Fri Jan 18, 2019 2:35 pm
Forum: Technical Discussion
Topic: GPIO on P6
Replies: 6
Views: 1354

GPIO on P6

P6 is the DAC/ADC line, in addition to a timer. But doesn't it have to be configured for DAC/ADC first? If I just assign it as a GPIO, shouldn't it act like a GPIO? I ask because that's not what I observe. If I set it to a pull-down, it remains up, but if I set it to a pull-up, I can pull it down wi...
by kwiley
Fri Jan 18, 2019 2:31 pm
Forum: Technical Discussion
Topic: The 5 VIAs just above the USB port
Replies: 4
Views: 942

Re: The 5 VIAs just above the USB port

Sorry, I didn't quite understand. You said the "VIN" input takes voltage from another source. Was that in reference to the 3.3v VIA I asked about or were you describing the VIN pin below P7? I was asking about the VIAs on the board. Or were you saying the VIN pin below P7 and the 3.3v VIA are direct...
by kwiley
Fri Jan 18, 2019 2:27 pm
Forum: Technical Discussion
Topic: M7 5V out?
Replies: 17
Views: 3473

Re: M7 5V out?

Hmmm, are you saying that there is some sort of "violation" involved in the fact that an Adafruit FT232H has a 5V supply line?
by kwiley
Fri Jan 18, 2019 1:42 pm
Forum: Technical Discussion
Topic: The 5 VIAs just above the USB port
Replies: 4
Views: 942

The 5 VIAs just above the USB port

The M7 (and the H7 apparently) has 5 VIAs above the USB port labeled GND, 3.3v, RST, SWD, and SWC. How are they used? Presumably GND is just an obvious ground connection. Is the 3.3v via an output "rail" to power other devices, or is it a VIN of some sort (and if so, is it really 3.3, unlike the VIN...
by kwiley
Fri Jan 18, 2019 1:33 pm
Forum: Technical Discussion
Topic: M7 5V out?
Replies: 17
Views: 3473

M7 5V out?

If I want to power a second device from the OpenMV, can I only power 3.3V devices, say from the 3.3V rail below P6? Can I not pass the USB connection's 5V on to another device?
by kwiley
Thu Jan 17, 2019 7:13 pm
Forum: Technical Discussion
Topic: 2 SPI devices at different speeds
Replies: 5
Views: 1038

Re: 2 SPI devices at different speeds

Oooookay. I see. Instead of calling lcd.init() every time, I directly reset the bus speed. That actually seems to work: pyb.SPI(2).init(pyb.SPI.MASTER, baudrate=15000000, polarity=0, phase=0) lcd.display(img) pyb.SPI(2).init(pyb.SPI.MASTER, baudrate=2000000, polarity=0, phase=0) That leaves one ques...
by kwiley
Thu Jan 17, 2019 7:07 pm
Forum: Technical Discussion
Topic: 2 SPI devices at different speeds
Replies: 5
Views: 1038

Re: 2 SPI devices at different speeds

BTW, the rotated text wasn't an explicit coding or effort request, although I appreciate your diligence. I was asking what was supported at the time, but not trying to make extra work for you.

Thanks.
by kwiley
Thu Jan 17, 2019 7:03 pm
Forum: Technical Discussion
Topic: 2 SPI devices at different speeds
Replies: 5
Views: 1038

Re: 2 SPI devices at different speeds

I actually thought of that before writing my post, but the resulting framerate dropped from 5 to 2! It got considerably worse. In fact, even if I just call lcd.init() right before I call lcd.display() the framerate drops to 2, even if I don't bother setting the bus to the slower speed in between fra...
by kwiley
Thu Jan 17, 2019 6:10 pm
Forum: Technical Discussion
Topic: 2 SPI devices at different speeds
Replies: 5
Views: 1038

2 SPI devices at different speeds

I am successfully driving two devices off the M7's SPI interface, the LCD shield and a third party device controlled from Pin 9. However, the other device operates at a maximum speed of 2MHz. Configuring the bus for 2MHz reduces the main-loop framerate to 5 fps as the LCD takes much longer to update...
by kwiley
Thu Jan 17, 2019 2:54 pm
Forum: General Topics
Topic: LED Selection not working as doccumented
Replies: 18
Views: 8350

Re: LED Selection not working as doccumented

I also have a clone board. You don't ship to Russia, so I got my M7 from ali and bought a registration key for it. :| To fix the led I swapped LED pins on the board: unmount LED unbend pins 3 & 4 mount LED to board using pins 1 & 2 pin 3 goes to Resistor pin 4 goes to 3.3V use smth to fix LED on bo...
by kwiley
Thu Jan 17, 2019 3:33 am
Forum: General Topics
Topic: User control/input/switches/etc.
Replies: 3
Views: 2301

Re: User control/input/switches/etc.

Cool. There's so much stuff out there and I'm not much of an electronics tinkerer, so I'm generally unaware of all these options.

Thanks.
by kwiley
Wed Jan 16, 2019 5:00 pm
Forum: General Topics
Topic: User control/input/switches/etc.
Replies: 3
Views: 2301

User control/input/switches/etc.

I'm not sure if this belongs in the technical forum, but at any rate, what is the best way to get a little bit of user control over the board? I would like to be able to influence the board's behavior a bit. The simplest example would be a "camera shutter button" that captures a photo at the current...
by kwiley
Sat Jan 12, 2019 8:04 pm
Forum: Technical Discussion
Topic: image drawstring() landscape orientation (or image rotation function)?
Replies: 3
Views: 2228

Re: image drawstring() landscape orientation (or image rotation function)?

Thanks. It isn't a crucial feature. It's just nice to support more a traditional landscape orientation is all. I'll give it a shot.
by kwiley
Fri Jan 11, 2019 2:40 pm
Forum: Technical Discussion
Topic: Are the ML examples written for the H7 (heap errors on M7)
Replies: 1
Views: 1762

Are the ML examples written for the H7 (heap errors on M7)

I can run the CIFAR10_fast example, which uses a smaller network file, but I can't run the other CIFAR example or the Levet example or the Smile example. They produce heap errors immediately. They also seem to depend on an SD card in that the on-board flash isn't big enough to transfer the network d...
by kwiley
Fri Jan 11, 2019 12:56 pm
Forum: Technical Discussion
Topic: image drawstring() landscape orientation (or image rotation function)?
Replies: 3
Views: 2228

image drawstring() landscape orientation (or image rotation function)?

Is there a straightforward way to write text onto the image in landscape orientation? I see no parameters to Image.draw_string() that would do this out of the box. Alternatively, is there correspondingly simple way to rotate an image (one could rotate, write text, then rotate back in order to mainta...
by kwiley
Fri Jan 11, 2019 3:33 am
Forum: Technical Discussion
Topic: Second SPI device while using LCD shield?
Replies: 12
Views: 3465

Re: Second SPI device while using LCD shield?

Assuming the LCD shield correctly ignores SPI commands when its hardwired CS pin 3 is high, I should be able to move forward on my own. I'll just use pin 9 for the CS to my other device and should be off and running. I'll see how it goes.

Cheers!
by kwiley
Fri Jan 11, 2019 3:02 am
Forum: Technical Discussion
Topic: Second SPI device while using LCD shield?
Replies: 12
Views: 3465

Re: Second SPI device while using LCD shield?

Hi, I'm going to be updating the LCD driver this week with better code after the next IDE release. I can make the driver deinit the SPI bus after using it per image write call. You won't see a performance impact but it will make things work such that our SPI bus use looks transparent. Out of curios...
by kwiley
Fri Jan 11, 2019 2:51 am
Forum: General Topics
Topic: LED Selection not working as doccumented
Replies: 18
Views: 8350

Re: LED Selection not working as doccumented

No, I agree. I'm just a perfectionist, and it gave me some concern that other parts of the board might have problems too, but all the example scripts work like a charm so the critical features are all working flawlessly as far as I can tell. Thanks. I regret missing the KS campaign. I was totally un...

Go to advanced search