-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWB issue #7
Comments
try changing do_awb in camera.py to
|
Thanks for your help. The code now works without error, however the image taken using python code with do_awb() still has different color than the one taken imageusing Touplite (see touplite_awb.jpg and python_awb.jpg attached). I also tried to manually set the temperature and tint using the values Touplite found for AWB (8458, 1299 in my case) which resulted in the image python_mwb.jpg, which has the same colors as python_awb.jpg, that is, more reddish than touplite_awb.jpg. I suspect the values (8458, 1299), while being both displayed in Touplite as the values used for doing AWB, and being used by do_awb() in camera.py, do not correspond to the actual values used by Touplite... Or maybe they are, but toupcam's python implementation of AWB does not work with the same temperature and tint values as Touplite. Any thoughts ? Thanks in advance Python AWB: Touplite AWB: Python MWB: |
you can try the following to print the calculated temp and tint then take a picture cam = ToupCamCamera(cid=...)
if cam.open():
time.sleep(1)
cam.save('no_awb.jpg')
def awb_hook(te, ti):
print('temp={}, tint={}'.format(te, ti))
cam.save('via_hook_awb.jpg')
cam.do_awb(callback=awb_hook)
# pic saved by `awb_hook` or here manually
#time.sleep(1)
#cam.save('awb.jpg') |
Hi,
I have a problem when trying to execute the do_awb() function. Python 3 gives me the following error:
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 234, in 'calling callback function'
File "/media/luca/70B60ED66D483C58/travail_luca/Pollen_Reader/code/controle/controle_python/camera.py", line 216, in temptint_cb
callback((temp, tint))
TypeError: function name must be string, bytes object or integer
Can you please help ? Thanks in advance,
ltp7
The text was updated successfully, but these errors were encountered: