Search found 30 matches

by type11969
Wed Nov 07, 2018 12:53 pm
Forum: Technical Discussion
Topic: Memory allocation error - comments!?!
Replies: 21
Views: 494

Re: Memory allocation error - comments!?!

well that was dumb miss on my part - thanks
by type11969
Mon Nov 05, 2018 3:23 pm
Forum: Technical Discussion
Topic: Memory allocation error - comments!?!
Replies: 21
Views: 494

Re: Memory allocation error - comments!?!

Do you have a canned conversion back to RGB? I took a look at doing this, and it seemed like much less code to just pull the RGB data and average directly (vs converting LAB to RGB). Different story if you guys already coded this.
by type11969
Sun Nov 04, 2018 5:17 pm
Forum: Technical Discussion
Topic: Memory allocation error - comments!?!
Replies: 21
Views: 494

Re: Memory allocation error - comments!?!

Thanks, definitely a change in my way of thinking. I'll give the del pixel a shot, and do some digging on the try: except: blocks - never heard of this.

-Chris
by type11969
Sat Nov 03, 2018 1:59 pm
Forum: Technical Discussion
Topic: Memory allocation error - comments!?!
Replies: 21
Views: 494

Re: Memory allocation error - comments!?!

Sorry. Honestly I'm not sure what is the root cause of the RAM allocation issue. If I had to guess, I'd say it was here: def analyzeArea(roi): cameraInit() #initialize the camera sensor.set_windowing(roi) #specify the region of interest sensor.skip_frames(time = 2000) # Wait for settings take effect...
by type11969
Fri Nov 02, 2018 11:03 pm
Forum: Technical Discussion
Topic: Memory allocation error - comments!?!
Replies: 21
Views: 494

Re: Memory allocation error - comments!?!

If you have time/are willing to take a look at my code for memory optimization opportunities, feedback will be appreciated. Please be kind, I generally code in C, and I'm not that great at it anyway. Note that if I take this code and remove the comments, it will fit. But barely. If I add any more fu...
by type11969
Fri Nov 02, 2018 10:50 pm
Forum: Technical Discussion
Topic: Memory allocation error - comments!?!
Replies: 21
Views: 494

Re: Memory allocation error - comments!?!

Hmm, this is the error I'm getting, no reference to a code line:

MemoryError: memory allocation failed, allocating 3242 bytes
MicroPython v1.9.4-4510-g23e8457de on 2018-06-29; OPENMV3 with STM32F765

Any ideas?
by type11969
Fri Nov 02, 2018 8:39 pm
Forum: Technical Discussion
Topic: Memory allocation error - comments!?!
Replies: 21
Views: 494

Re: Memory allocation error - comments!?!

Really? Thanks, sorry, I completely missed that. I was focused on the bytes that couldn't be allocated.
by type11969
Fri Nov 02, 2018 2:28 pm
Forum: Technical Discussion
Topic: Memory allocation error - comments!?!
Replies: 21
Views: 494

Re: Memory allocation error - comments!?!

Is there a way to reliably test which line is causing the allocation failure?
by type11969
Thu Nov 01, 2018 7:40 pm
Forum: Technical Discussion
Topic: Memory allocation error - comments!?!
Replies: 21
Views: 494

Re: Memory allocation error - comments!?!

Okay, so I am taking a series of small images - color analysis on defined portions of an image. Should I run a del img command? Or simply run a gc.collect() at the end of the function where I analyze the image? Apologies if this is a basic question, still trying to navigate python. Appreciate the he...
by type11969
Thu Nov 01, 2018 5:39 pm
Forum: Technical Discussion
Topic: Memory allocation error - comments!?!
Replies: 21
Views: 494

Re: Memory allocation error - comments!?!

Please bear with me, I am only somewhat okay at programming in C. So I am used to a precompiler - comments take no space, etc.

So, to confirm, the SD card will not help with memory allocation errors, correct?
by type11969
Thu Nov 01, 2018 3:59 pm
Forum: Technical Discussion
Topic: Memory allocation error - comments!?!
Replies: 21
Views: 494

Re: Memory allocation error - comments!?!

I'm not familiar with del_object and gc_collect, so no, I'm not doing this. My program is pretty simple, its just a bit long, honestly I'm surprised I'm having a memory allocation problem.

Why would it work if I save direct to the camera, but not work when using the IDE?
by type11969
Thu Nov 01, 2018 10:01 am
Forum: Technical Discussion
Topic: Memory allocation error - comments!?!
Replies: 21
Views: 494

Re: Memory allocation error - comments!?!

Hmm, so it seems like I can save the program to the openMV cam and run it as is, but I can't run it through the IDE. Does this make sense? Any workarounds? Debugging will be somewhat annoying if I can't use the IDE. Note that when I connect the OpenMV to my computer, the drive pops up with ~15gb of ...
by type11969
Thu Nov 01, 2018 8:07 am
Forum: Technical Discussion
Topic: Memory allocation error - comments!?!
Replies: 21
Views: 494

Memory allocation error - comments!?!

To date I've been using an OpenMV cam with no SD card. The program I've written started returning allocation errors, but I was able to just squeeze it in under the limit. And then I commented the code. Comments bumped me over the limit!? This doesn't seem right. But I confirmed line by line that the...
by type11969
Wed Oct 31, 2018 8:09 pm
Forum: Technical Discussion
Topic: Running program without the IDE - upload, reset, no-go
Replies: 14
Views: 316

Re: Running program without the IDE - upload, reset, no-go

Sorry, by issue I was more curious about why re-flashing the firmware enabled standalone operation. I've written off the other OpenMV cam and ordered another - I'm sure that issue was due to user error.
by type11969
Wed Oct 31, 2018 1:29 pm
Forum: Technical Discussion
Topic: Running program without the IDE - upload, reset, no-go
Replies: 14
Views: 316

Re: Running program without the IDE - upload, reset, no-go

Update: I was able to demonstrate that an OpenMV cam disconnected from my custom adapter PCB was able to run standalone, even using UART1. I then proceeded to swap the header orientation on this OpenMV cam (so I could connect to my custom PCB), and somehow managed to kill that OpenMV cam in the proc...
by type11969
Tue Oct 30, 2018 1:02 pm
Forum: Technical Discussion
Topic: Running program without the IDE - upload, reset, no-go
Replies: 14
Views: 316

Re: Running program without the IDE - upload, reset, no-go

Thanks guys, really appreciate it! Some clarification questions: 1) Is it okay to proceed with using UART1? 2) Is standalone operation impacted because I am using UART1? In other words, if I shift to UART3, do you expect that standalone operation will begin functioning? Note that I will independentl...
by type11969
Tue Oct 30, 2018 8:27 am
Forum: Technical Discussion
Topic: Running program without the IDE - upload, reset, no-go
Replies: 14
Views: 316

Re: Running program without the IDE - upload, reset, no-go

Thanks, but I'm using an OpenMV Cam M7. If I follow that link, it states the following: UART 3 RX -> P5 (PB11) UART 3 TX -> P4 (PB10) UART 1 RX -> P0 (PB15) (OpenMV Cam M7 Only) UART 1 TX -> P1 (PB14) (OpenMV Cam M7 Only) Which is further supported by the pinout provided on this page: https://cdn.sh...
by type11969
Mon Oct 29, 2018 8:19 pm
Forum: Technical Discussion
Topic: Running program without the IDE - upload, reset, no-go
Replies: 14
Views: 316

Re: Running program without the IDE - upload, reset, no-go

Thanks, but I've already done this. My quote above "I've uploaded my script, I've confirmed that the file has been updated on the OpenMV side, I've reset the camera and nothing happens." means: Tools->Save open script to OpenMV cam Tools->Reset OpenMV cam Navigate to the USB drive hosted by the Open...
by type11969
Mon Oct 29, 2018 5:11 pm
Forum: Technical Discussion
Topic: Running program without the IDE - upload, reset, no-go
Replies: 14
Views: 316

Re: Running program without the IDE - upload, reset, no-go

I confirmed the issue with a very simple file: # Untitled - By: cphelan - Mon Oct 29 2018 import sensor, image, time, pyb from pyb import delay uart = pyb.UART(1, 115200, timeout_char = 1000) #pin 0 = RX, pin 1 = TX while(True): uart.write ("test") delay(1000) What do I need to do to get this runnin...
by type11969
Mon Oct 29, 2018 5:02 pm
Forum: Technical Discussion
Topic: import custom "module" - file location?
Replies: 6
Views: 242

Re: import custom "module" - file location?

Thanks, I moved to my backup OpenMV cam which didn't have the same issue, I'll check the drive the next time I use the other cam.
by type11969
Mon Oct 29, 2018 5:01 pm
Forum: Technical Discussion
Topic: Running program without the IDE - upload, reset, no-go
Replies: 14
Views: 316

Running program without the IDE - upload, reset, no-go

Subject says it all. I've uploaded my script, I've confirmed that the file has been updated on the OpenMV side, I've reset the camera and nothing happens. My program works without issue when running through the IDE. I've taken a look through the threads on this topic, but all seemed to have been res...
by type11969
Tue Oct 23, 2018 5:49 pm
Forum: Technical Discussion
Topic: import custom "module" - file location?
Replies: 6
Views: 242

Re: import custom "module" - file location?

Just to confirm, "disk" is referring to the folder that pops up upon physical USB connection, correct? If so, then no, I do not see test.py carried over to this folder. In fact, if I use the "save open script to openMV cam" command, I don't see test_main.py saved to this folder either. So apparently...
by type11969
Tue Oct 23, 2018 2:50 pm
Forum: Technical Discussion
Topic: import custom "module" - file location?
Replies: 6
Views: 242

Re: import custom "module" - file location?

Thanks. If I make a change to test.py, I do get prompted with the following - Module test on your OpenMV Cam is different than the copy on your computer. Would you like OpenMV IDE to update the module on your Open MV Cam? If I click yes, I then get the same error - ImportError: no module named 'test...
by type11969
Mon Oct 22, 2018 8:57 pm
Forum: Technical Discussion
Topic: import custom "module" - file location?
Replies: 6
Views: 242

import custom "module" - file location?

Greetings. Apologies in advance, I have some C programming background but I am a complete newbie to python. I am trying to do something simple - I'm trying to organize my project in to separate files much like I usually do with my C based projects. But for whatever reason, I cannot get the "import" ...
by type11969
Thu Sep 06, 2018 9:56 pm
Forum: Technical Discussion
Topic: Q1 MOSFET - part number?
Replies: 1
Views: 103

Q1 MOSFET - part number?

Greetings. I'd like to re-purpose Q1, can you share the PN so I can determine the current rating, etc. I'll just be illuminating some white LEDs to light the image area - won't be much current but I want to confirm.

Thanks,

Chris
by type11969
Wed Aug 29, 2018 11:56 am
Forum: Technical Discussion
Topic: RGB565 to RGB888?
Replies: 5
Views: 302

Re: RGB565 to RGB888?

Thanks guys
by type11969
Wed Aug 29, 2018 8:29 am
Forum: Technical Discussion
Topic: RGB565 to RGB888?
Replies: 5
Views: 302

Re: RGB565 to RGB888?

Thanks. If I use the get_pixel() command with a bayer format, is a 10b value returned? My understanding is that the sensor has 10ADCs per pixel, but after interpolation, RGB565 results. Ultimately I don't care too much about absolute color conversion - I'll be using a LUT developed from known colors...
by type11969
Tue Aug 28, 2018 9:54 pm
Forum: Technical Discussion
Topic: RGB565 to RGB888?
Replies: 5
Views: 302

RGB565 to RGB888?

Greetings, question regarding color resolution. The sensor is RGB565, but the graphical stats provided in the IDE are RGB888. How are these RGB888 numbers calculated? How is that extra 8b of information estimated? If there is a good article discussing this, please send it my way. Related question, I...
by type11969
Wed Aug 15, 2018 8:59 am
Forum: Project Discussion
Topic: Colorimetry/reflected light assessment?
Replies: 3
Views: 221

Re: Colorimetry/reflected light assessment?

Great feedback, thanks guys. I'm sure I will have many more questions as I progress, but this feedback at least leads me to believe that I've come to the right place. Thanks again!

-Chris
by type11969
Tue Aug 14, 2018 1:17 pm
Forum: Project Discussion
Topic: Colorimetry/reflected light assessment?
Replies: 3
Views: 221

Colorimetry/reflected light assessment?

Greetings - new user with an OpenMV Cam M7 on the way. Probably should have asked this question before ordering, but I think I will find a use for this device regardless. Anyway, I hoping to get some high level feedback from those that are familiar with the OpenMV platform about my intended use. I'd...

Go to advanced search