galaunay / pypyueye

Convenience wrapper around pyueye API for IDS cameras.
20 stars 17 forks source link

hi there #1

Open udiNur opened 6 years ago

udiNur commented 6 years ago

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

galaunay commented 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.

udiNur commented 6 years ago

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:

  1. master gain automatic - enable/disable
  2. expose automatic - enable/disable
  3. the color of the camera is not normal, if you don't know what I mean, I can add a picture.
  4. record video: your function working in very low fps, I need it in the fps that I use in the app-view A. I need to show the video live in the app, and also add an option to start and stop recording (without losing quality in the video file or in the live-view.

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.

galaunay commented 6 years ago

Thanks for finding the bug. I will gladly accept a PR.

I don't have access to any ueye camera at the moment, hope this still helps.

udiNur commented 6 years ago

hi, about the gain:

I also successfully manage to change the gain. I used your code to solve it :)

here is the image that I grab from the program: cam_proggram

here is the image that I grab using the pyueye & pypyeueye examples me

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

galaunay commented 6 years ago

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 ?