Commit Graph

2031 Commits

Author SHA1 Message Date
Kwabena W. Agyeman
aeb0238040 Added hmirror and vflip support to the MT9V034 and example scripts (#294)
* Added hmirror and vflip support to the MT9V034 and example scripts.

* Moved sensor example scripts to one place.

* Add delay to these script for register settling time.
2017-12-31 00:32:01 +02:00
Kwabena W. Agyeman
b906c5f192 Add auto gain control setting support (#293)
You can now get the auto gain setting in dBs and set the value in dBs.
Example scripts are included. Code was tested on the OV7725.
2017-12-30 23:18:35 +02:00
Kwabena W. Agyeman
7be0a7a182 Add exposure control for all sensors (#292)
* Textual register cleanup.

No functional changes.

* Add exposure control support.

You can now set the exposure for the camera in microseconds (versus an
opaque unknown value previously). First, we have a new method called
get_exposure_us() which will get the expsoure time in microseconds. This
let's you determine what the auto exposure algorithm set the exposure
time to. Second, the previously implmented set_auto_exposure() method
which allows you to turn aec off and on accepts a exposure_us keyword
argument when you turn aec off to manually control the exposure.

The next commit will add support for other sensor types.

* Cleanup register formatting.

No functional changes.

* Add exposure control support for the OV2640.

Register access for this chip is a PITA.

* Formatting Cleanup.

No functional changes.

* Add exposure control for ov9650.

Just doing it for all sensors.

* Add missing 2 factor.

* Added exposure control for the MT9V034.

* Add exposure control example.

Works well on the OV7725.
2017-12-30 15:56:11 +02:00
Ibrahim Abd Elkader
c78a269f5a
Merge pull request #291 from kwagyeman/adaptive_threshold
Add adaptive thresholding to filters.
2017-12-28 02:56:50 +02:00
Kwabena W. Agyeman
cbbead0785 Add adaptive thresholding to filters.
I still need to go back and optimizing and cleanup the code. I just
wanted to get the feature in first.
2017-12-27 19:23:48 -05:00
iabdalkader
7cec96a9db Fix H7 build. 2017-12-28 01:04:51 +02:00
Ibrahim Abd Elkader
57b8ba2cda
Merge pull request #290 from kwagyeman/frame_difference_scripts
Add frame differencing example scripts.
2017-12-28 00:29:51 +02:00
Kwabena W. Agyeman
a6b659131d Add frame differencing example scripts.
Better ones that can work in memory now.
2017-12-27 14:43:36 -05:00
Ibrahim Abd Elkader
ece149d8d2
Merge pull request #288 from kwagyeman/sensor_fb_fix
Restore MAIN_FB() size on snapshot()
2017-12-26 21:24:00 +02:00
Ibrahim Abd Elkader
d5721a4f39
Merge pull request #289 from kwagyeman/histeq_update
Refactor histeq()
2017-12-26 13:48:10 +02:00
Kwabena W. Agyeman
dcc31ec37d Refactor histeq()
Just updating the code with the same style as other methods. I have
another new sister method for histeq() comming up next which I'll push
as soon as this PR is done. Didn't want to merge the two into one PR.
2017-12-26 00:02:51 -05:00
Kwabena W. Agyeman
046a2e1825 Restore MAIN_FB() size on snapshot()
This fix allows "copy_to_fb" with a different resolution than the
current frame buffer to work. It also allows the frame buffer to be
resized, etc. In particular, the pooling methods I added for optical
flow work again... you'll also be able to scale the frame buffer too.
2017-12-25 18:00:58 -05:00
Ibrahim Abd Elkader
e0fc302dda
Merge pull request #287 from kwagyeman/compare_methods
Add extra frame buffer.
2017-12-25 19:14:47 +02:00
Kwabena W. Agyeman
27f5110ab7 Add extra frame buffer.
You can now allocate an extra frame buffer for storing images. However,
this takes memory from the main frame buffer. In particular this reduces
the RAM for many methods that do image processing making memory errors
more likely to happen. Note that you may allocate as many extra fb's as
you like. Dealloc happens in reverse order.

Anyway, you can use this method to now storage things like difference
images in RAM allowing for MUCH faster frame difference image
processing.

Moving on, to keep memory management sane... the second fb looks just
like an image and you can use all the image methods to load and update
it, etc. That said, if users deallocate the second FB they need to *NOT*
use the image pointer anymore. There's no way for me to delete the image
pointer in python right now so this is just something that has to be
manually managed (even if I did setup a deconstructor the second FB is
on a stack... so, things wouldn't work so easily with that).
2017-12-24 22:40:26 -05:00
iabdalkader
e1fa2371bb Add missing H7 flash constants. 2017-12-24 22:14:02 +02:00
iabdalkader
a9c8cdb752 Update system.c to support H7. 2017-12-24 22:13:38 +02:00
iabdalkader
f8ba3e4e10 Use MCU_SERIES 2017-12-24 22:11:57 +02:00
iabdalkader
04ce644f55 Add H7 headers and startup. 2017-12-24 22:10:30 +02:00
iabdalkader
a51e0de410 Copy USB code to bootloader.
* The bootloader will be more self-contained.
2017-12-24 21:24:25 +02:00
iabdalkader
e0779b685c Add H7 HAL 2017-12-24 21:23:01 +02:00
iabdalkader
ed761075e4 Update OMV4 board files. 2017-12-24 21:07:50 +02:00
iabdalkader
fe59c25e22 PYDFU: Send clear status only if DFU is not idle.
* H7 bootloader doesn't seem to like it.
2017-12-24 20:43:23 +02:00
Ibrahim Abd Elkader
6753b93842
Merge pull request #286 from kwagyeman/compare_methods
Add a LUT for illuminvar()
2017-12-24 17:24:31 +02:00
iabdalkader
9cb0ca0b9a Add no-strict-aliasing to STHAL CFLAGS. 2017-12-24 17:21:08 +02:00
Kwabena W. Agyeman
f2c36e780a Add a LUT for illuminvar()
It's now faster to be more useful.

Need to work on HDR for the sensor and making the sensor output better.
I fixed some issues with the illuminvar() method going crazy when it
gets colors with values near 0... but, the shot noise from the sensor
adds a lot of noise to everything. Fixing this will likely solve a lot
of algorithm problems.
2017-12-23 21:16:55 -05:00
Ibrahim Abd Elkader
7346efbf0d
Merge pull request #285 from kwagyeman/compare_methods
Compare methods
2017-12-23 22:22:22 +02:00
Kwabena W. Agyeman
e2025e8d1e SSIM Code
Image comparison using SSIM. It can be used to detect image
differences... but, the algorithm was designed to compare image quality
and look at compression artifacts. Anyway, it works kinda okay for
detecting frame differences.
2017-12-23 15:01:13 -05:00
Kwabena W. Agyeman
e5eb7185fb Line ops can now accept a parameter value. 2017-12-21 22:22:12 -05:00
iabdalkader
5a1b3e82f5 Update firmware images. 2017-12-21 21:07:23 +02:00
iabdalkader
f2431de175 Add a list of matching keypoints to keypoints match object. 2017-12-21 21:07:01 +02:00
iabdalkader
eabdcbbbca Add unary_op and subscr to keypoints object. 2017-12-21 19:53:20 +02:00
iabdalkader
a4c792a046 Update firmware images. 2017-12-19 00:26:34 +02:00
iabdalkader
ed7cb98b86 Fix bootloader linker script. 2017-12-18 23:38:23 +02:00
Ibrahim Abd Elkader
9b652606dd
Merge pull request #284 from kwagyeman/illuminvar
Add chrominace and illuminace invariant image generators.
2017-12-18 15:36:35 +02:00
Kwabena W. Agyeman
937aa1fa22 Add chrominace and illuminace invariant image generators.
Both algorithms were tested on the OpenMV Cam using images loaded from a
file and work correctly. However, shot noise from the sensor.snapshot()
makes the output value somewhat worthless except in a situation unless
you've controlled for it. Anyway, the illuminvar work best when the
image is constrained to a very particular view point looking at a flat
scene without shadow and then a shadow enters.

(Not adding demo's for these methods since the output looks like crap
unless you've put some work into constraining the scene... need to add
HDR code and other stuff to the sensor module to get better images).
2017-12-17 21:57:08 -05:00
iabdalkader
d1c15610bb Add low power example scripts. 2017-12-17 16:15:05 +02:00
iabdalkader
dca8f3781d Fix low-power modes. 2017-12-17 01:58:37 +02:00
iabdalkader
531bc0de6c Fix openmv-fb.py script. 2017-12-13 01:59:46 +02:00
iabdalkader
2fb155aff3 Update docs. 2017-12-10 04:34:51 +02:00
Ibrahim Abd Elkader
f77284e38a
Merge pull request #283 from falkoschindler/master
changing sign of z_rotation() to follow conventions of a right-handed coordinate system...
2017-12-07 11:26:40 +02:00
iabdalkader
59daa1d03e Update firmware images. 2017-12-06 20:49:20 +02:00
iabdalkader
c94eb8f12a Update WINC firmware script 2017-12-06 20:45:48 +02:00
iabdalkader
4ca7cbe266 Update WINC1500 firmware. 2017-12-06 20:35:13 +02:00
iabdalkader
9cc209d128 Add WINC BSP mode.
* For programming FW via WINC's debug UART.
2017-12-06 20:33:26 +02:00
iabdalkader
fcc3b0b9c6 Make WINC programmer accept firmware file path. 2017-12-06 17:08:45 +02:00
iabdalkader
475c083c75 Move ffs_strerror declaration to header. 2017-12-06 16:44:57 +02:00
iabdalkader
16f7e96434 Fix WINC fw update script. 2017-12-06 15:30:58 +02:00
iabdalkader
278fb1c797 Update docs. 2017-12-06 15:30:30 +02:00
iabdalkader
64c2d1a535 Revert "Update docs."
This reverts commit 3eca75774f.
2017-12-06 15:29:23 +02:00
iabdalkader
3eca75774f Update docs. 2017-12-06 14:12:16 +02:00