Search found 14 matches

by matiasandina
Thu Mar 26, 2020 12:47 pm
Forum: Technical Discussion
Topic: Temperature value of each pixel captured by LEPTON
Replies: 39
Views: 3772

Re: Temperature value of each pixel captured by LEPTON

Hello, Just a follow up question. My script saves .jpg images. If I understood correctly, the max and min temps I selected will be mapped to 0 and 255 into an rgb image. Does this mean that the same rgb image could be actually encoding different temperatures if taken on two sessions with different m...
by matiasandina
Fri Mar 06, 2020 9:32 am
Forum: Technical Discussion
Topic: Timestamp filenames
Replies: 31
Views: 5024

Re: Timestamp filenames

Thank you both. Your work is really great! I think that for anybody running the cam out of the IDE, setting the cam clock would be nice. I opened an issue in GitHub, I understand you guys have other stuff of higher priority, but just for keeping it there. It's true that relying on the IDE does not s...
by matiasandina
Thu Mar 05, 2020 3:26 pm
Forum: Technical Discussion
Topic: Timestamp filenames
Replies: 31
Views: 5024

Re: Timestamp filenames

Update: After a significant amount of struggle, here's a code that would set the time on the board. I didn't add the `break` yet, I was wondering whether it would ever be possible to see the camera or I would need to have a separate script to check the camera. Dealing with openMV is great if I can ...
by matiasandina
Wed Mar 04, 2020 4:30 pm
Forum: Technical Discussion
Topic: Timestamp filenames
Replies: 31
Views: 5024

Re: Timestamp filenames

Nice! it finally works.
I had to modify "wb" instead of "w" because we are trying to write binary, but it works.

Code: Select all

with open("img.jpg", "wb") as f:
    f.write(img)
Now I'll to adapt this to the actual use of sending a date
by matiasandina
Wed Mar 04, 2020 3:47 pm
Forum: Technical Discussion
Topic: Timestamp filenames
Replies: 31
Views: 5024

Re: Timestamp filenames

Here's the code import sys, serial, struct port = '/dev/ttyACM0' sp = serial.Serial(port, baudrate=115200, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, xonxoff=False, rtscts=False, stopbits=serial.STOPBITS_ONE, timeout=None, dsrdtr=True) sp.setDTR(True) # dsrdtr is ignored on Windows. sp.wr...
by matiasandina
Wed Mar 04, 2020 3:38 pm
Forum: Technical Discussion
Topic: Timestamp filenames
Replies: 31
Views: 5024

Re: Timestamp filenames

Thank you, that's a great idea! I modified a bit the code. Yes, I am using the H7 This code produces a blinking blue LED that never turns off (so it's not received the "snap" from python) import sensor, image, time, ustruct, pyb from pyb import USB_VCP usb = USB_VCP() sensor.reset() sensor.set_pixfo...
by matiasandina
Wed Mar 04, 2020 2:39 pm
Forum: Technical Discussion
Topic: Timestamp filenames
Replies: 31
Views: 5024

Re: Timestamp filenames

Looks fine [email protected]:~/Desktop$ cat /media/choilab/4621-1383/main.py import sensor, image, time, ustruct from pyb import USB_VCP usb = USB_VCP() sensor.reset() sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.QVGA) sensor.skip_frames(time = 2000) while(True): cmd = usb.recv(4...
by matiasandina
Wed Mar 04, 2020 1:52 pm
Forum: Technical Discussion
Topic: Timestamp filenames
Replies: 31
Views: 5024

Re: Timestamp filenames

I am running on a Desktop computer (Ubuntu), running with sudo gives the same result.
by matiasandina
Wed Mar 04, 2020 1:33 pm
Forum: Technical Discussion
Topic: Timestamp filenames
Replies: 31
Views: 5024

Re: Timestamp filenames

Hi, I have the OpenMV IDE open but not connected to the camera. If I want to modify things on the micropython side, I then connect the camera, upload the script as main.py and disconnect. I call my python script from commandline as python3 connect_serial.py. If I don't disconnect I get `Device or re...
by matiasandina
Wed Mar 04, 2020 9:38 am
Forum: Technical Discussion
Topic: Timestamp filenames
Replies: 31
Views: 5024

Re: Timestamp filenames

The unmodified example doesn't work on my end. At first I got an error about encoding, which prompted me to modify the "snap" string I added one line message = "snap".encode() sp.write(message) When I do this, and I call my python script from command line, nothing happens, looking like an infinite w...
by matiasandina
Tue Mar 03, 2020 3:12 pm
Forum: Technical Discussion
Topic: Timestamp filenames
Replies: 31
Views: 5024

Re: Timestamp filenames

Maybe I wasn't specific enough.
I cannot make the connection run...not even the simpler version of just send the "OK" and read it on python, could you help me?
by matiasandina
Tue Mar 03, 2020 2:19 pm
Forum: Technical Discussion
Topic: Timestamp filenames
Replies: 31
Views: 5024

Re: Timestamp filenames

Yes, I understand it has one but it is not going to function as a clock that can stay on when power off. Hence, my suggestion of having a powered one for a next iteration. Sorry if this is too basic but can you help me develop a bit more on the USB_VCP connection? I am checking the example and I can...
by matiasandina
Tue Mar 03, 2020 10:01 am
Forum: Technical Discussion
Topic: Timestamp filenames
Replies: 31
Views: 5024

Re: Timestamp filenames

OK I will have that in mind for filenames. The RTC absence is bummer. I know this will add cost, but I think it would be nice to have a RTC module powered by a small battery in future iterations of the board. Setting the time on each power up is not trivial when deployed. For many applications, date...
by matiasandina
Mon Mar 02, 2020 3:15 pm
Forum: Technical Discussion
Topic: Timestamp filenames
Replies: 31
Views: 5024

Timestamp filenames

I would like to create a timestamp for my captured images. I wrote these helper functions to do so. def year(datetime): return str(datetime[0]) def month(datetime): return str('%02d' % datetime[1]) def day(datetime): return str('%02d' % datetime[2]) def hour(datetime): return str('%02d' % datetime[4...

Go to advanced search