# DGP measured significantly lower by evalglare

hello everyone!
I am a college student who wants to use evalglare to measure DGP.
I want to measure the DGP value by taking a picture through the Raspberry Pi camera and converting it to HDR image, but it is measuring significantly low. I’m new to evalglare and don’t know a lot about it. Please help me
The code used this
‘evalglare -c checkfile.pic -vta -vv 220 -vh 220 -d image.hdr > glrfile.txt’

Hi @JUNYOUNG,

It does not appear that you have calibrated the brightness of your image correctly. The brightest pixel of your image appears to have a radiance of 1 W/m^2/sr, or 179 cd/m^2. You need to calibrate your camera by measuring the actual brightness of some portion of the image, and then multiplying the values of your image by a correction factor to scale them up. You could build this correction factor into the response curve of your camera, assuming you have calculated it with `hdrgen` or something similar.

Additionally, I notice that the aspect ratio of your image is not correct. While the portion of the scene viewable through the fisheye lens should be a circle, it is in fact an ellipse. You will need to change the way you crop your photograph to correct this.

Hi @Nathaniel_Jones!
I haven’t used evalglare, so I don’t know how it multiplies the image values by the correction factor. Do you happen to have any documentation or posts that talk about multiplying by the correction factor? What I want to do is measure glare from the sun.
Thanks!

Hi @JUNYOUNG,

Evalglare will not do the multiplication for you. You need to make that correction yourself when you create the HDR image. How did you create `image.hdr`? Something about your process is not correct.

Also, with respect to your evalglare command, you are using `-vv 220 -vh 220`, which doesn’t seem to match up with what is in `image.hdr`. How did you arrive at these numbers?

Hi @Nathaniel_Jones !
The image.hdr was created by compositing photos through python coding with the Mertens compositing method.

I wrote -vv -vh as 220 because the angle of the fisheye lens is 220 degrees.

I’m new to this, so there’s a lot I don’t know. Thanks again for your reply!

Hi @JUNYOUNG,

Because you have coded your own compositing function in Python instead of using a standard tool, it will be very difficult to debug this. However, it the simplest solution for you is probably to perform the multiplication in Python before you save the HDR file.

One problem with your implementation is that it has distorted the aspect ratio of your image, so that the view through the lens is an ellipse instead of a circle. If you intended to do that, then your -vv and -vh should differ from each other because the image shows a different number of degrees vertically an horizontally. A more intuitive solution, though, would be to crop the image tight to the visible part of the scene outside of the lens, in which case it’s more likely that your -vv and -vh will be 180 degrees.

Thank you for your kind response!

So you’re saying that before I composite the photos and save them as HDR files, I just multiply them with a correction for the luminance of the photos via Python?

I’m running through the translator now to understand,
it would be better to do the analysis with 180 degrees of -vv and -vh, except for the outer part of the fisheye lens (black border at each corner)?

Once again, thank you so much for your kind response!

Hi @JUNYOUNG,

You would perform the multiplication after compositing but before saving.

The corners are not relevant. The degree measurements are taken through the center of the image, vertically and horizontally.

Thank you so much for your kind response!

I’ll try the method you suggested, and we’ll make the measurements, thank you very much!

Do you mind if I ask the question again if I try to measure again and it doesn’t work?