-
Notifications
You must be signed in to change notification settings - Fork 0
Tut_SetupCalib
This page is written with VOP v0.16 in mind
When the whole VOP is installed and you have navigated to the webGUI you can finally start positioning and setting up lens, camera, and projection screen to make the best composites that the VOP can muster.
If you haven't already. Make sure that the camera is pointing about as squarely towards the HDMI Projection Screen. At first, the distance between screen and camera can be kind of a guess. But do that guess and we'll refine it later.
To help with lining up the camera, there is a live view that can be accessed. To get to it. Click the button called CALIBRATION and witness the Calibration page. On the right hand side you have a few controls useful to calibration. We'll start with the basic lining up and focusing.
Press the START FEED BUTTON. The Pi Camera HQ will now show a live feed on the preview window on the left. You can right click the preview window to open the feed in its own tab if you want to get it full screen. On the preview screen, blue boxes will appear with little crosses in them. On the monitor you should see crosses in the corners as well and a siemens focus start in the middle.
The goal here is to line up the camera so that the crosses on the screen are as close as possible to the crosses crosses in the boxes on the preview monitor. This should ensure that there's little to no alignment skews in the final images.
If your lens has a zoom function. Set it to the point that suits your physical space. Longer lenses tend to be less distorted than shorter ones. But longer lenses also can have pincusion distortion. So find a nice middleground that fits your lens and screen size.
Regarding aperture. If you have an aperture ring. You will want to set the aperture to be at a point where the image is as sharp as possible. And often enough, as dark as possible, to allow for very long exposures without extra Neutral Density Filters. So stop it down until you get it as sharp and dark as possible. But not so far down that you start having problems with diffraction. Somewhere in the middle of the aperture range is usually good. But your lens may vary.
When you get close to perfect alignment, you can also adjust the lens focus. This often becomes a bit of a dance as cheaper lenses "breathe" quite heavily during focusing so you focus it sharp. Find you need to adjust the distance, then it's out of focus again, so you adjust focus and now the distance have to be adjusted again. Do this loop a few times so that you have a good alignment and focus so sharp that you start to see the moire patterns in the siemens star.
Now you have the physical setup mostly done. You can click the STOP FEED button once you're done playing with hands between the camera and Projection Monitor.
Since this guide is assuming that the setup is fairly new. The image you are seeing is probably very green after you have done the calibration and done a few test exposures. Do not worry. That Matrix filter is a quirk of modern CMOS systems and how the VOP treats the image pipeline.
Modern CMOS sensors arrays build each color pixel with an array of 4 sub pixel sensors. They are arranged in a BAYER pattern with the colors:
| R | G |
| G | B |
This means that each pixel has twice as much green data as the R and B colors. This is a setup by engineers to exploit the way our eyes work.
As human eyes are much more sensitive to tonal details in the green frequencies of the color spectrum. The extra color data from the green sensors are used to make a higher detailed brightness channel. At least that's how I have had it explained.
The VOP, to have full control over timings, bypasses a lot of prettifying functions that the Pi Camera HQ often does when taking pictures. Among them is the white balance. So by default. We will get the image from the camera in its rawest state, just after the debayering, before any white balance adjustments. So we need to do the white balance ourselves.
On the main page, in the CAMERA CONSTANTS, there are the two fields AWB R and AWB B. These inputs are there to provide a way to do the white balance manually by tweaking the gain for Red and Blue. As the green channel is so saturated from the BAYER pattern. The system doesn't show a direct way to adjust the Green channel. If you want. You can do some trial and error here. Tweaking Red and Blue, snapping and exposure, tweaking again and so forth. But there is a way that tends to work more simply.
If you open the Calibration page again. You should see, under the Framing & Focus and Peak White and Currrent Calibration segments, you should see "AUTO WHITE BALANCE". When used, the Projection Monitor shows a neutral grey screen, the camera sees it, does adjustments, and repeats until it has achieved reasonable white balance. The section has a few inputs:
- Grey Level - This sets how bright the Grey screen should be. Default to 0.5 to be a middle grey.
- Initial Exposure(s) - This tells the VoP how long the initial exposure should be. It defaults to 1.0 for a single second. The VOP will during subsequent measurements adjust this so that the color channels stay reasonable and don't clip.
- Expo Target Low - When the measurements are run, if it finds that exposure is too low, it should find a higher exposure until it passes this treshold. This is to make sure that we aren't measuring noise in the dark. The default here is 0.45 for 45 % brightness.
- Expo Target High - This tells the VOP to not accept a measurement where exposure is in danger of clipping in the channels. If the measured exposure is too high, the measurement will repeat with a lower value until the higher treshold is reached.
These controls are only used in the calibration page. And you are free to use the AWB R and AWB B to tweak it to suit your need if the colors you get are not what you want.
- AUTO WHITE BALANCE - This starts the automated White Balance sequence.
Once done. The AWB_R and AWB_B fields under it will be filled in. Along with a ACCOUNTANT'S TRUTH that shows a float value of how close to 0 divergence it managed to get to in the end. You will see that the values on the main page have been updated as well.
Since I have yet to afford a nice calibrated 4:3 12" OLED monitor in UHD resolution. I have had to make due with lower quality portable monitors. This does work but they have some issues inherent to the technology. Especially, the black levels.
As these simpler monitors have a color pixel layer that can be addressed per pixel and a background light that's always on. When you try to show an image that is mostly black (as is often the case with the VOP)
The black outside the lit up pixels is not actually black. But very dark grey. In most cases. Most human viewers do not notice this. Because in real world use. The brightness of the image's highlights adjust our eyes so that the darkest grey feels black. It's an exploint that works in regular use cases. But the VOP, those cases are indeed rare.
The problem comes when you need to do a long exposure. The pixels that to the eye are dark grey, basically black, becomes more visibly grey when on exposures 10 or more seconds. And when it comes to multiple exposures (the ME in LIME). Those exposures add up. And we are actually raising the noise floor of the photographed image the more we do this.
A frame that has a single 6 second exposure probably won't see much of that problem. But if you need to stack exposures with different elements. That's when you start having problem. As 5 elements added to the same screen with 6 seconds each. That's a total accumulation of 30 seconds of exposure. In that case the noise floor raising will become a problem.
When you know the exposure time that a frame needs you can do the exposure. Then simply pull the exposure down to clip the noise floor into black. And when you do multiple exposures of 6 second frames. You now have black added to black. Which becomes black, not dark grey or even medium visible grey.
So what you do is to set the playhead of the camera on the main page at the keyframe that you want to use as the reference frame. Then on the Calibration page, you hit the Measure button in Noise Crusher.
The VOP will now show the blackest image that the Projection Screen can show. The camera will take a single exposure of that black frame using the exposure time that the current frame should have. And when done, it measures a square worth's of pixel in the middle to determine what the noise floor is for the exposure. When it's done, the screen will return to idle and you get a suggested Noise Crusher level as a float. This float is clickable and if you want the result, you click it so that it's copied over to the float input on the same row.
Now all the exposures in this job will consider this as the treshold where no useful information is and clip it out as pure black by moving all color values down by that much.
It is an unfortunate fact that image sensors aren't perfect. The same holds true for the Pi Camera HQ. It's a marvelous sensor in many respects for a very decent price. And I built the whole VOP around it. But there's usually things like hot pixels and dead pixels. These get more prominent with longer exposures. And the VOP almost always do longer exposures.
So we need to somehow negate its less than ideal output. Defect Mapping function attempts this.
You start this process by blocking the light coming into the sensor. With the lens cover or something else.
Then click the MAP PIXELS button. This will fire off an exposure at the current frame's exposure time. And when done. It will look through and catalogue the bright pixels it finds in the resulting image. These are the hot pixels. And until the map is nuked with NUKE MAP, all subsequent images taken with the VOP will be cleaned up using this map. Or at least attempted to be cleaned up.
Once these steps are done. The VOP should be giving the cleanest images that it can muster. Provided that lens and projection screen is clean and free of dust, grease and grime..
Repo run by: https://jmalmsten.com