Search found 82 matches

by kwiley
Thu Feb 14, 2019 1:12 pm
Forum: General Topics
Topic: exposure and gain control
Replies: 11
Views: 392

Re: exposure and gain control

Are we able to achieve a relatively flat gamma curve? Flat gamma, while often not pleasing to the eye, is very helpful in analysis.
by kwiley
Tue Feb 12, 2019 7:50 pm
Forum: General Topics
Topic: exposure and gain control
Replies: 11
Views: 392

Re: exposure and gain control

I already inquired about adding a global shutter module to my H7 preorder. I hope it all goes smoothly. :-) My initial project with the M7 has gone well, but I need more juice.
by kwiley
Tue Feb 12, 2019 2:05 pm
Forum: General Topics
Topic: exposure and gain control
Replies: 11
Views: 392

Re: exposure and gain control

I used to do long exposure astrophotography with modified webcams. We (the group that was into this) would perform circuit modifications of the webcam to enable manual control of the sensor shutter and then we could run very long exposures. I wrote pretty much the only and best (if I may say so) Mac...
by kwiley
Sun Feb 10, 2019 5:11 pm
Forum: Technical Discussion
Topic: OSError: [Errno 110] ETIMEDOUT?
Replies: 3
Views: 223

Re: OSError: [Errno 110] ETIMEDOUT?

Yeah, I did that, and if it solves the problem, that's fine. I was just curious what causes it and whether it indicates that I'm doing something wrong or can otherwise alleviate it.
by kwiley
Sun Feb 10, 2019 3:20 am
Forum: Technical Discussion
Topic: OSError: [Errno 110] ETIMEDOUT?
Replies: 3
Views: 223

OSError: [Errno 110] ETIMEDOUT?

I occasionally get "OSError: [Errno 110] ETIMEDOUT" when querying a Sparkfun Qwiic keyapad (https://www.sparkfun.com/products/14836). It doesn't correlate with whether a button has actually been pressed. The error is merely associated with querying the line. Any thoughts?
by kwiley
Sat Feb 02, 2019 12:22 pm
Forum: Technical Discussion
Topic: Memory differences between terminal and IDE
Replies: 5
Views: 170

Re: Memory differences between terminal and IDE

Ah, mine's already tighter than that. It reduces variable names, replaces constants, etc. Okay, no worries.
by kwiley
Sat Feb 02, 2019 12:09 am
Forum: Technical Discussion
Topic: Memory differences between terminal and IDE
Replies: 5
Views: 170

Re: Memory differences between terminal and IDE

I've written my own basic code minimizer already, but did you have a specific tool in mind?
by kwiley
Fri Feb 01, 2019 9:52 pm
Forum: Technical Discussion
Topic: Memory differences between terminal and IDE
Replies: 5
Views: 170

Re: Memory differences between terminal and IDE

Well, I guess it works if I pull those imports into a new blank file. So the length of the file is part of the problem. I guess it tries to put the file in memory before processing the imports or something like that. Does that sound right?
by kwiley
Fri Feb 01, 2019 9:46 pm
Forum: Technical Discussion
Topic: Memory differences between terminal and IDE
Replies: 5
Views: 170

Memory differences between terminal and IDE

When I run my program from the IDE, it currently runs out of memory while pulling in the imports, before actually doing any work, so to speak. Admittedly, I pull in some modules that I wrote, not just "stdlib" like stuff. But if I copy/paste those exact initial import statements into a screen sessio...
by kwiley
Fri Feb 01, 2019 7:29 pm
Forum: Technical Discussion
Topic: External SD card access
Replies: 5
Views: 195

Re: External SD card access

Never a feature request, always an inquiry to current capabilities that I'm unsure I'm aware of. No worries.
by kwiley
Fri Feb 01, 2019 5:43 pm
Forum: Technical Discussion
Topic: uos vs os modules
Replies: 2
Views: 196

uos vs os modules

How does the uos module differ from the more standard os module? Should I be using one over the other if I want to read/write arbitrary files (not necessarily images, gifs, or videos) to and from the SD card?

Same question applies to the uio and io modules of course.
by kwiley
Fri Feb 01, 2019 5:40 pm
Forum: Technical Discussion
Topic: External SD card access
Replies: 5
Views: 195

External SD card access

I realize OpenMV provides its own SD card, but sometimes you want to utilize an external SD card. For example, I'm working with an Arduino shield that has its own SD card. In Arduinoland, it is accessed from the Arduino SD.h library, which uses SPI to interact with the SD card. There is an SS pin on...
by kwiley
Fri Feb 01, 2019 5:35 pm
Forum: Technical Discussion
Topic: Overclocking example seems out of date
Replies: 1
Views: 85

Overclocking example seems out of date

The overclocking example calls get_frequency() but the current options appear to be: >>> import cpufreq >>> cpufreq. __class__ __name__ set_frequency get_current_frequencies get_supported_frequencies >>> cpufreq.get_current_frequencies() (216, 216, 54, 108) >>> cpufreq.get_supported_frequencies() [1...
by kwiley
Tue Jan 29, 2019 1:12 pm
Forum: Technical Discussion
Topic: Image.copy(): "OSError: Cannot copy to fb!"
Replies: 19
Views: 539

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

Ah, so even if I pass an image reference in to use as a preallocated buffer, I should still capture the returned reference and use that from that point forward.
by kwiley
Tue Jan 29, 2019 1:08 pm
Forum: Technical Discussion
Topic: gain maxes out at 32
Replies: 2
Views: 115

Re: gain maxes out at 32

Thanks. That's fine. Just wanted to understand what was going on.
by kwiley
Tue Jan 29, 2019 3:47 am
Forum: Technical Discussion
Topic: gain maxes out at 32
Replies: 2
Views: 115

gain maxes out at 32

The docs say you can set a gain ceiling up to 128, but if you print out the gain continuously, it never exceeds 32 (well, 29.82729, but that's the gain returned by get_gain_db() that corresponds to a setting of 32). Setting it to 64 or 128 doesn't push it up any higher. I tried setting the ceiling b...
by kwiley
Mon Jan 28, 2019 11:18 pm
Forum: Technical Discussion
Topic: Image.copy(): "OSError: Cannot copy to fb!"
Replies: 19
Views: 539

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

So I'm attempting to preallocate an image to hold an extracted ROI from the sensor's snapshot. This seems to work: roi_img = sensor.alloc_extra_fb(roi_w, roi_h, sensor.RGB565) However, I have discovered that if I change the pixformat, the extracted ROI does not change with it even though it claims t...
by kwiley
Mon Jan 28, 2019 1:14 pm
Forum: Technical Discussion
Topic: M7 5V out?
Replies: 17
Views: 491

Re: M7 5V out?

Out of curiosity, are you saying the diode in the same location on the H7 doesn't have an anode directly connected to 5V? I admit the H7 is a little more crowded so the diode isn't as easily exposed as I took advantage of (it looks like there is a resister just below it), but are you saying it is no...
by kwiley
Mon Jan 28, 2019 10:28 am
Forum: Technical Discussion
Topic: Image.copy(): "OSError: Cannot copy to fb!"
Replies: 19
Views: 539

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

I don't think I realized I could keep multiple images in the frame buffer. I thought it *was* or *referred to* the image from the sensor such that any manipulations of the "frame buffer" altered that one "buffered most recent frame". I had misunderstood that entirely. I'll look into that option. It ...
by kwiley
Mon Jan 28, 2019 1:37 am
Forum: Technical Discussion
Topic: Image.copy(): "OSError: Cannot copy to fb!"
Replies: 19
Views: 539

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

So, silly question. How do I create a blank Image of a given resolution and mode to pass into copy in the copy_to_fb parameter? I can visualize how to create a blank bytearray for raw pixel data and pass that in, but I don't see a way to create an Image. The only Image ctor I see in the docs creates...
by kwiley
Mon Jan 28, 2019 1:14 am
Forum: Technical Discussion
Topic: Image.copy(): "OSError: Cannot copy to fb!"
Replies: 19
Views: 539

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

Can't wait to test drive it. Thanks.
by kwiley
Mon Jan 28, 2019 12:56 am
Forum: Technical Discussion
Topic: RGB channel extraction
Replies: 16
Views: 546

Re: RGB channel extraction

Oh hey, look at that. You did. That's an awesome addition. It might be worth looking at the text quality a bit, at least to replicate the previous integer values (make 2 like the old 2) even if the floating values have some issues for the time being.

It's not too important.

Cheers!
by kwiley
Sun Jan 27, 2019 11:41 pm
Forum: Technical Discussion
Topic: RGB channel extraction
Replies: 16
Views: 546

Re: RGB channel extraction

Ummm, funny question, but did you do anything to the fonts in the recent firmware? Drawn text looks quite different all of a sudden (and much worse, very hard to read now, at least at the same font settings).

I only see this new artifact at scale 2. Scales 1 and 3 look good.
by kwiley
Sun Jan 27, 2019 11:36 pm
Forum: Technical Discussion
Topic: RGB channel extraction
Replies: 16
Views: 546

Re: RGB channel extraction

Oh, the "Run Bootloader" menu option seems to do the trick.
by kwiley
Sun Jan 27, 2019 11:15 pm
Forum: Technical Discussion
Topic: RGB channel extraction
Replies: 16
Views: 546

Re: RGB channel extraction

May I presume this also includes the recent changes with regard to image rotation? Now I just have to learn how to flash the firmware. I see where the docs say "Use the IDE built-in dfu tool to update the firmware." but I haven't figured out what that means yet. I noticed that if I click the firmwar...
by kwiley
Sun Jan 27, 2019 12:08 pm
Forum: Technical Discussion
Topic: M7 5V out?
Replies: 17
Views: 491

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: 539

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: 539

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: 491

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: 188

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: 188

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: 491

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: 491

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: 539

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: 539

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: 539

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: 195

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: 16
Views: 546

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: 195

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: 16
Views: 546

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: 215

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: 215

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: 16
Views: 546

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: 16
Views: 546

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: 16
Views: 546

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: 198

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: 491

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: 268

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: 268

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 ...

Go to advanced search