Skip to content
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

Camera response calibration #12

Open
AhmedShaban94 opened this issue Nov 19, 2017 · 3 comments
Open

Camera response calibration #12

AhmedShaban94 opened this issue Nov 19, 2017 · 3 comments

Comments

@AhmedShaban94
Copy link

AhmedShaban94 commented Nov 19, 2017

Hi,
I've a problem with calculating inverse camera response function on my own data set.
the ICRF doesn't appear to be monotonic (or normal) at all, knowing that I've tested the code on different data sets that I've created on my own.
I've attached a sample of (G) that appears to me in the following link and times.txt file.
range of exposure time in my camera is 0.01 ms up to 100 ms.
CRF : https://ibb.co/eSj2A6
times.txt: https://file.io/XZMlAm

@NikolausDemmel
Copy link

Some ideas for failing photometric calibration:

  • Is the gain of you camera fixed? Make sure AGC is disabled.
  • Do you capture the full range of pixel values form 0 to 255 bytes?
  • Is the lighting really controlled and not changing (e.g. moving clouds can already be a problem)?
  • Can you do a successful calibration for the online dataset (calibration sequences)?

@AhmedShaban94
Copy link
Author

@NikolausDemmel .. first of all thanks for your reply !
regarding your questions:
1- Yes, I've disabled AGC of the camera and the gain of the camera is now fixed.
2- After plotting a histogram of all images in my data set (spectrum-no. of pixels in all images), I've noticed that not all the spectrum is covered. that's why (nan) showed up in pcalib.txt.
so, I decided to perform normalization(feature scaling) on all pixels of all images. that enabled me to cover the whole range.
Note: my camera sensor can't capture 0 value pixels even if the cap of the camera is on !
ICRF(G) (after scaling & fixing camera gain) : https://ibb.co/kwwV7m
3- the lighting is really controlled as I'm capturing in indoor scene with no-moving objects.
4- Yes, it's was a successful calibration.
Now, I'd ask if the scaling operation is a right approach to compensate the uncovered range ?
and what caused that sudden drop in the function attached ? the function is still not monotonic !
Thanks in advance.

@NikolausDemmel
Copy link

3- If you have halogen lights, beware that they flicker with 50 or 60 Hz, which might also influence your image acquisition. Inspect all the images visually and watch out for artifacts.

2- Not sure what exactly you are doing, but any transformation you do before the calibration, you must then also do in the exact same way before removing the vignette and applying the inverse camera response later. The transformation must be constant in the sense that it does not depend on the current image. Then I think it should be fine.

If you just don't ever measure pixel intensities below a certain value, you can also manually set the response function for those pixels to something simple like "linear between 0 and the lowest observed value".

  • Another idea of what might go wrong: Make sure your exposure times are accurate. Some sensor driver API let you only get the current setting of exposure time, and don't give you up-to-date metadata for every frame. I.e. after changing the exposure time, you might get some frames that were still captured with the previous exposure time, you you record the new exposure time for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants