Open udiNur opened 6 years ago
Hi,
Thank you for your interest.
Unfortunately, I stopped trying to use pyueye because I had some trouble implementing some features I needed. I am not really willing to give it another try at the moment.
Maybe if you could develop a bit what you need I could give you some leads on how to do it on a fork of pypyueye.
hi
first, thank you for your response!
you doing here amazing and required job! the code is so simple and writing so good. from your code, I lorn a lot on how to work with pyeye in the right way.
I need a few things:
I successfully manage to change the fps (of the app view, but not in video recording ) using your function and also change the expose of the cam (you have a bug in your function:
def set_exposure(self, exposure):
"""
Set the exposure.
Returns
=======
exposure: number
Real exposure, can be slightly different than the asked one.
"""
new_exposure = ueye.c_double()
check(ueye.is_Exposure(self.h_cam,
ueye.IS_EXPOSURE_CMD_SET_EXPOSURE,
new_exposure, 8))
return new_exposure
here you not setting the new exposure, insted you give empty c_double var,
i change the new_exposure = ueye.c_double()
to new_exposure = ueye.c_double(exposure)
and then its work perfectly)
I also successfully manage to change the gain.
If I solve things for good, I'll be happy to make a pull request.
Thanks for finding the bug. I will gladly accept a PR.
set_gain
method by using set_exposure
as a template.RecordThread
to just store the images in memory, an encoding all the images at the end of the acquisition.FrameThread
and RecordThread
).I don't have access to any ueye camera at the moment, hope this still helps.
hi, about the gain:
I also successfully manage to change the gain. I used your code to solve it :)
and update from now, I happy to say that I succeeded to set the gain to auto mode! using this code:
# TODO find out what das the sec value
def set_expose_auto(self, value, value_to_return=0):
"""
Set auto expose to on/off.
Args
=======
value: int Number;
value_to_return: int Number
Returns
=======
list: report
"""
print("set auto gain to {}, (additional sets to: {})".format(value, value_to_return))
value = ueye.c_double(float(value))
value_to_return = ueye.c_double(float(value_to_return))
print("cTypes: arg1: '{}' arg2: '{}'".format(value.value, value_to_return.value))
report = [ueye.is_SetAutoParameter(self.h_cam,
ueye.IS_AUTO_EXPOSURE_RUNNING,
value,
value_to_return
), value.value, value_to_return.value]
print(report)
return report
the bug that I found, idk if it that a real bug, because I'm not a camera expert, and this is the result about the automatic exposer I still not found who to do it, do you have any idea?
here is the image that I grab from the program:
here is the image that I grab using the pyueye & pypyeueye examples
like you can see, the pillow on the bad is in a blue color in the first image (the snapshot the official ids program), this is the color of the pillow. in the second image, as you can see, the color is orange (all of the colors in the image are not like in the first image). do you know why? and who can I solve it?
thank you very much for all the help! and sorry about my English
and update from now, I happy to say that I succeeded to set the gain to auto mode!
That is great, I didn't know about the SetAutoParameter
function.
about the automatic exposer I still not found who to do it, do you have any idea?
After a quick search, they seems to refer exposure time as 'shutter' time. So you may be able to get auto exposure using the same kind of code as for auto gain, but with IS_SET_ENABLE_AUTO_SHUTTER
.
like you can see, the pillow on the bad is in a blue color in the first image (the snapshot the official ids program), this is the color of the pillow. in the second image, as you can see, the color is orange (all of the colors in the image are not like in the first image). do you know why? and who can I solve it?
Thanks for providing the images. As the colors are not completely incoherent (like reversed levels or colours swapped, my first guess would be color correction from the camera or the software. There is something in the API documentation here about color correction on the camera side:
The Correction class provides methods for setting the color correction for color cameras. This enhances the rendering of colors for cameras with color sensors. Color correction is a digital correction based on a color matrix which is adjusted individually for each sensor.
It should be accessible through is_SetColorCorrection
.
Are you getting closer to what you wanted ?
hi there, hi working on a little project for myself, that I'm using on ueye camera. I work in python, and when I search on GitHub for a framework that does a better job from the pyeue lib I found your repo.
As you probably know, there are many things that you can add to your lib. I need a few specific things that I can pay (via PayPal or something) for them, and you can add them to your repo also.
I will be happy that you contact me at kv100100@gmail.com, and send me there skype/WhatsApp or hangout, and your time zone, for we can talk about it.
if you can, also write here a comment, that for I don't miss your email.
thanks