Commit Graph

21 Commits

Author SHA1 Message Date
Matt Dawson
a94b16a49d draw_image_bilinear_interp_alpha_palletes_and_center_image 2020-05-03 21:24:51 -07:00
mattdawson
eb94f153dd Fix formatting. Remove un-needed error check for image format with color palette. 2020-04-24 13:42:05 +12:00
mattdawson
91efa307e0 Add custom palettes to draw image with demo 2020-04-23 21:33:01 +12:00
Kwabena W. Agyeman
c5c9770d3a Improve rotation_correction()
* Optimized code to make it run slightly faster.
* Added fov argument to control the zoom effect better.
* Added perspective correction through 4 point correspondence.
2020-03-04 23:00:59 -08:00
iabdalkader
577899a5a0 Fix mutable_bayer error message. 2019-11-13 02:03:13 +02:00
Jarek Jurasz
7ca922642d More specific image format errors. 2019-11-12 11:29:46 +01:00
iabdalkader
54b8132949 License update. 2019-09-05 22:17:50 +02:00
iabdalkader
940c56ec8c Rename py_image_unavailable_obj. 2018-06-04 18:17:21 +02:00
iabdalkader
c9e4be4df3 Move py_image_unavailable_obj to py_helper. 2018-06-04 18:14:28 +02:00
Kwabena W. Agyeman
efe69c961d Add support for scalar operations
This brings all our basic operations code up to spec with other image
library offers.

Anyway, you can now pass a "color" value as the parameter to a basic op
method and it will apply that value to all pixels in the image.
2018-03-20 03:31:24 -04:00
Kwabena W. Agyeman
fc74e70c32 Upgrade Drawing Features
Heavily upgraded the drawing features onboard the OpenMV Cam. We now
have all the basic drawing methods folks expect along with all the
parameters you need. Finally! You can make big text fonts.

* Added line thickness support
* Added shape fills
* Added text scaling
* Added draw arrow.
2018-03-12 01:14:03 -04:00
Kwabena W. Agyeman
e0e112468e Argument Parsing Done Correctly
All of our argument parsing code has now been updated to handle
positional as well as keyword arguments in our python libraries.

Basically, python allows you to pass some number of positional arguments
to functions/methods followed by keyword arguments (you cannot have more
positional arguments after keyword arguments). Previously, our code
would only look for keyword arguments. Now, it works better and will
grab as many positional arguments as it can followed by processing
keyword arguments. Note: If the case of a positional argument value for
a parameter being passed followed by a keyword for that same parameter
the keyword value is taken (since it comes aftward).

Because arguments were passed in keyword form before this update has no
affect on current code. However, moving forward, argument positions are
now locked and cannot be moved around.
2018-03-05 00:49:36 -05:00
Kwabena W. Agyeman
646425b2a6 Add color thresholding support to get_histogram/stats.
You can now pass a color threshold list to get histogram and get stats
(along with an invert arg) to control what gets put into the histogram.
2018-02-21 01:27:13 -05:00
Kwabena W. Agyeman
213396d090 Complete Overhaul of phasecorrelation
Just doing one big commit/PR here since I noticed that breaking it up
causes issues.

Anyway, these fixes give us GOOD/WORKING/FAST optical flow now on the
OpenMV Cam M7. A number of changes were made to the optical flow
scripts. You have have absolute and differential estimation example
scripts. Additionally, you also have the ability to measure rotation and
scale changes too. Linear/Log Polar conversion was added for this. Users
may use the new code for generic image manipulation too. Finally, I
updated the power of 2 resolutions since you actually HAVE to use them
with optical flow for the phasecorrelation code to work correctly.

I have some more advanced scripts coming after this. But, This commit is
already getting kinda large so I'm stopping it here.
2018-01-07 17:48:07 -05:00
Kwabena W. Agyeman
30ecbdc4f8 Add white balance control.
You can now get white balance gains from the camera chip and set the
camera to then use these gains again in a new enviorment.
2017-12-31 19:56:02 -05:00
Kwabena W. Agyeman
6a8ce01e79 Add QRCode detection.
Use the qrcodes script and point your OpenMV Cam at google search
results for QR Codes.
2016-12-27 15:30:35 -05:00
iabdalkader
49124b4e8c Add py_helper_lookup_int_array. 2016-09-13 01:59:32 +02:00
iabdalkader
2594a1e320 Add py_helper_lookup_offset. 2016-06-17 00:30:02 +02:00
Kwabena W. Agyeman
7a01a9bede Final Imlib Cleanup
Finished going through imlib.c.
-> Histeq uses fb_alloc now and has hook for RGB histeq when reserve YUV
LUT is added (coming soon in next PR).

Cleanuped py_helper.c/h
-> No functional changes. Just added some header info.

Finished going through py_image.c
* 1 - Finished general code cleanup and updating everything to using new
library functions. In particular, I updated the remaining find_*
functions with the new roi clipping code when they accept rois.
* 2 - Made blob stuff return a list when nothing is found so you don't
have to do an if on the returned value anymore.
* 3 - img subscr is more powerful now allowing image reading and
writing. I updated this because I had to use it to find a previous bug
with socket.send() for the WINC driver.
* 4 - Renamed find_eyes to find_eye. Because it just finds one eye.
* 5 - Other than that just general code cleanup to make functions look
consistent.

And yes, changes have been test. Face tracking, eye tracking, keypoints,
etc. all work still.

Future things todo before release:
1 - Change all LAB stuff to YUV.
2 - Add in reverse YUV->RGB LUT and update functions like Mode() to use
this so they don't generate messed up outputs, also histeq() too.
3 - Add any remaining sensor control functions like agc control.
2016-04-25 21:55:49 -04:00
iabdalkader
124a31772c Rename helper functions. 2016-02-22 18:47:35 +02:00
iabdalkader
5860695f5d Move helper functions to new files. 2016-02-22 18:41:50 +02:00