Commit Graph

506 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
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
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
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
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
iabdalkader
d1c15610bb Add low power example scripts. 2017-12-17 16:15:05 +02:00
iabdalkader
531bc0de6c Fix openmv-fb.py script. 2017-12-13 01:59:46 +02:00
iabdalkader
c94eb8f12a Update WINC firmware script 2017-12-06 20:45:48 +02:00
iabdalkader
16f7e96434 Fix WINC fw update script. 2017-12-06 15:30:58 +02:00
iabdalkader
2f32dad550 Add sensor sleep mode example. 2017-11-04 17:45:37 +02:00
iabdalkader
8b35752706 Fix find_line_segments unit test 2017-11-01 22:01:42 +02:00
Kwabena W. Agyeman
8d63f6d84b Fix up lens_correction and add example script. 2017-10-28 00:31:01 -04:00
Kwabena W. Agyeman
5e3cf92ac4 Add perspective rotation correction code.
This code will help you undo image rotation issues in the X/Y/Z
direction. The demo shows off the frame buffer spinning around.
2017-10-27 01:21:13 -04:00
iabdalkader
3fd020e848 Remove old example. 2017-10-13 16:54:06 +02:00
Ibrahim Abd Elkader
0cf13e8777 Merge pull request #263 from kwagyeman/lsd
Lsd
2017-09-13 18:09:50 +02:00
Kwabena W. Agyeman
5a3153c8b9 Find line segments more stable
Switched the find line segments algorithm to something more stable using
the standard LSD algorithm that's used by OpenCV.
2017-09-13 00:33:31 -04:00
Kwabena W. Agyeman
7dff089e6f Removed QRCodes from the OpenMV Cam M4.
They don't really work that well on it anyway due to having to use a low
res. This makes room for more basic CV features on the M4 which it can
run.
2017-09-03 14:39:14 -04:00
Christoph Schmidt-Hieber
0c697c4c90 Update to latest openmv API
Make this script work as a standalone program, and update to latest openmv API
2017-08-23 12:19:01 +02:00
iabdalkader
b65bd2cb87 Add template and eye unit-tests. 2017-08-10 16:02:19 +02:00
iabdalkader
246a39d2c5 Add find_codes unit-tests. 2017-08-09 00:31:05 +02:00
iabdalkader
b79daef5d7 Add missing image for unit-tests. 2017-08-08 00:28:44 +02:00
iabdalkader
798ef73154 Move unit-tests. 2017-08-08 00:23:47 +02:00
iabdalkader
8557d55745 Update unit-tests script. 2017-08-08 00:22:12 +02:00
iabdalkader
3a7bb9487c Add more unit-tests. 2017-08-08 00:18:05 +02:00
iabdalkader
b8eca48d13 Add find_blobs unit-test. 2017-07-16 20:21:28 +02:00
iabdalkader
9cc6e9616f Add get_histogram unit-test. 2017-07-16 20:01:50 +02:00
Kwabena W. Agyeman
a4e556e7e3 Add find_rects() using AprilTag's quad detector.
It's awesome.
2017-07-13 01:25:23 -04:00
iabdalkader
d7bbf3a5d9 Add cat face Haar cascade. 2017-07-11 23:49:27 +02:00
iabdalkader
4d409d57f3 Update Haar unit test. 2017-07-11 23:47:55 +02:00
iabdalkader
ef38b68aa2 Move GC collect after loading unit test function. 2017-07-11 23:45:02 +02:00
iabdalkader
db62c80765 Add unit tests. 2017-07-11 23:10:16 +02:00
iabdalkader
200ffeed58 Add LeNet! 2017-07-11 04:10:40 +02:00
normen
9d5c16f2d8 Remove unnecessary loops in Haar importer
- Loops were added due to sleep deprivation :)
- Rename "threshold" variable to something more appropriate
2017-07-11 01:52:31 +02:00
normen
3d7283b1ee Remove debug output for Haar importer 2017-07-10 07:16:58 +02:00
normen
6266ef139f Fix Haar cascade importer for new XML format - working! 2017-07-10 06:48:26 +02:00
normen
93c1a4860c Improve new XML Haar format support
- Add support for both old and new format to importer
- Header generation still missing for new format!
- Still issues with rect feature count in new format
2017-07-10 02:06:17 +02:00
normen
0002e899f8 Fix a few more issues with the Haar importer
- It imports and creates binary files that don't crash the cam
- No tracking yet
- Number of features from rects is different than number of features from weakClassifiers for some reason..
2017-07-10 01:41:08 +02:00
normen
c30f0616cb Changes to make Haar importer work with new XML format
- Still seems to create buggy data, camera starts to blink blue/white after a while when trying to use the cascade, no tracking at all
- Only the actual conversion part has the changes, info and header not
- Few info on format, limited info here: http://answers.opencv.org/question/8418/explanation-of-cascadexml-in-a-haar-classifier/
2017-07-07 03:18:09 +02:00
Kwabena W. Agyeman
5f4e690fa1 Add find circles.
Now you can find circles with your OpenMV Cam! The alrogithm can eek out
about 7 FPS on a 160x120 image which is quite impressive given how
computationally expensive circle finding is...
2017-07-04 14:09:21 -04:00
Ibrahim Abd Elkader
1bbf18e11d Merge pull request #247 from kwagyeman/master
Add linear regression
2017-06-29 18:28:52 +02:00
iabdalkader
d6b048a9af Add servo shield example. 2017-06-29 16:17:21 +02:00
iabdalkader
97cbeeefe2 Move tests folder. 2017-06-29 16:04:32 +02:00
Kwabena W. Agyeman
cd4ad0dff3 Add linear regression
For easy line following mainly. In non-robust mode the line is computed
using least squares. In robust mode the line is computed using the
Theil-Sen median of slopes method. We do not use the Siegel Median of
Medians operation because it costs more CPU time... but, more
importantly there's no way to improve the centroid estimate so even if
the slope is more robust the line will be drawn in the wrong place.
2017-06-28 01:16:15 -04:00
iabdalkader
7d29104ed6 Add sensor.flush() 2017-06-25 16:48:17 +02:00
iabdalkader
d0b45e3cd4 Fix HoG script. 2017-06-19 01:33:40 +02:00
iabdalkader
32211bcd44 Remove test draw keypoints.
* Draw keypoints called with the wrong args.
2017-06-16 23:58:35 +02:00