Mirage Recorder - Page 12 at DVinfo.net
DV Info Net

Go Back   DV Info Net > Special Interest Areas > Alternative Imaging Methods
Register FAQ Today's Posts Buyer's Guides

Alternative Imaging Methods
DV Info Net is the birthplace of all 35mm adapters.

Reply
 
Thread Tools Search this Thread
Old January 25th, 2008, 01:04 PM   #166
Major Player
 
Join Date: Mar 2007
Location: Amsterdam The Netherlands
Posts: 200
Hello Jason,

Well the color LUTs wasn't working yet, I thought I would be able to implement them quite easilly, just when I got to the point that is also should be able to extrapolate when it became really complicated ugly code.

I thought I would show you the YUV and gamma correction formulas.

Code:
R = gamma_correction(input_row[(x * 3) + 0]);
G = gamma_correction(input_row[(x * 3) + 1]);
B = gamma_correction(input_row[(x * 3) + 2]);
            
rec709_RGB_to_YPbPr(R, G, B, &Y, &Pb, &Pr);
            
output_row[(x << 2) + 0] = 1.0f;
output_row[(x << 2) + 1] = (Y * 0.85882352941176465f) + 0.062745098039215685f;
output_row[(x << 2) + 2] = (Pb * 0.8784313725490196f) + 0.5f;
output_row[(x << 2) + 3] = (Pr * 0.8784313725490196f) + 0.5f;
Code:
static inline float rec709_gamma(float L)
{
    if (L < 0.018f) {
        return 4.5f * L; 
    } else {
        return 1.099f * powf(L, 0.45f) - 0.099f;
    }
}
Code:
static inline void rec709_RGB_to_YPbPr(float R, float G, float B, float *Y, float *Pb, float *Pr)
{
    const float Kr = 0.2126f;
    const float Kg = 0.7152f;
    const float Kb = 0.0722f;
 
    *Y = Kr * R + Kg * G + Kb * B;
    *Pb = (B - *Y) / (2.0f - 2.0f * Kb);
    *Pr = (R - *Y) / (2.0f - 2.0f * Kr);
}
__________________
VOSGAMES, http://www.vosgames.nl/
developer of Boom Recorder and Mirage Recorder
Take Vos is offline   Reply With Quote
Old January 25th, 2008, 01:13 PM   #167
Major Player
 
Join Date: Nov 2007
Location: Athens Greece
Posts: 336
Quote:
Originally Posted by Jason Rodriguez View Post
So if I understand correctly that image then only has had gamma correction applied, there has been no saturation added to the image? For instance, you mentioned:

- Add rec709 gamma correction
- Convert to YUV using rec709 YUV conversion

So these two steps are not applying some form of color saturation multiplier on the image (they shouldn't, but was just wondering)?

I'm just wondering if that's the level of saturation you're getting straight from the camera head, or if there is a multiplier somewhere in your color-conversion steps to give the more saturated image I'm seeing as the end product. It sounds like from your description there isn't any saturation stages.

Thanks,

Jason

Welcome to natural CCD saturation:) Being used to CMOS, the difference might be striking.
John Papadopoulos is offline   Reply With Quote
Old January 25th, 2008, 01:20 PM   #168
Major Player
 
Join Date: Mar 2007
Location: Amsterdam The Netherlands
Posts: 200
Hi John,

I find it strange that there is a difference between CCD and CMOS in regards to color saturation. If both CCD and CMOS are the same size and have the same color filter on them them the same amount of light will fall in each photon well.

Maybe you can't have the same filters for CCD and CMOS?

Cheers,
Take
__________________
VOSGAMES, http://www.vosgames.nl/
developer of Boom Recorder and Mirage Recorder
Take Vos is offline   Reply With Quote
Old January 25th, 2008, 01:36 PM   #169
Major Player
 
Join Date: Nov 2007
Location: Athens Greece
Posts: 336
Quote:
Originally Posted by Take Vos View Post
Hi John,

I find it strange that there is a difference between CCD and CMOS in regards to color saturation. If both CCD and CMOS are the same size and have the same color filter on them them the same amount of light will fall in each photon well.

Maybe you can't have the same filters for CCD and CMOS?

Cheers,
Take
They are not the same size at all! The Kodak pixel is 7.4um. The pixel on Red and SI and any low frame rate cmos is much smaller. The pixel on the SI sensor is 5um or something like that. The Kodak pixel is twice the area. The filters are also different depending on the manufacturer technology and experience. Kodak came from a huge film colorimetry background and Sony absolutely dominates the ccd market with its ccd technology. CMOS includes more processing on chip and comes with a higher noise floor. Sensor filters play a large part in saturation, the overlap, the relative balance etc.

I believe the cmos low saturation is inherent to the technology and the complexity of the sensor pixels. I have seen lots of unprocessed images from cmos sensors and this appears to be universally true.
John Papadopoulos is offline   Reply With Quote
Old January 25th, 2008, 01:43 PM   #170
Trustee
 
Join Date: Mar 2003
Location: Virginia Beach, VA
Posts: 1,095
Actually there are a number of CMOS manufacturers who get excellent color from their sensors . . . for instance, Micron can get the same level of color-saturation and accuracy from their camera-native RGB image, and so can Canon as what I'm seeing from the Kodak CCD's.

So I don't think it's fair to state that CCD=good color while CMOS=bad color. A lot of it has to-do with the manufacturing process, the pigments used, the color-fastness of the pigments (a trade-off of less saturation for more long-term robustness), and the compatibility of the color pigments with the manufacturing process.

Also the pixel size is 5um on the Altasens in order to get 1920x1080 in a 2/3" compatible format. And from seeing the work that Micron has done, small pixels (<5um) does not mean poor color saturation out-of-camera.

Thanks,

Jason
Jason Rodriguez is offline   Reply With Quote
Old January 25th, 2008, 01:47 PM   #171
Major Player
 
Join Date: Nov 2007
Location: Athens Greece
Posts: 336
Yes, lots of tiny pixel CCD still get excellent saturation, tiny sensor multimegapixel still cameras etc.

But any time I tried to get low light saturation in a CMOS I had to process a lot. With CCD I think I should even reduce saturation in good light. The saturation is usually natural at mid levels.

I do believe a Canon 350d is poor in color performance compared to a D70s. But that's just personal preference.
John Papadopoulos is offline   Reply With Quote
Old January 25th, 2008, 02:02 PM   #172
Trustee
 
Join Date: Mar 2003
Location: Virginia Beach, VA
Posts: 1,095
Quote:
But any time I tried to get low light saturation in a CMOS I had to process a lot.
Have you tried the Microns? The "low-light" performance of those sensors might not be as excellent as a large-sensor CCD, but the color saturation is very nice.

Another thing to realize is the CCD's are clock-constrained . . . for instance, if one wants to have a single camera that can be as "film-like" as far as is possible in the range of frame-rates that one can cover, you can't do that with CCD's at the moment.

Also CCD's can get very hot compared to a simliar CMOS, and the hotter they get, the noisier. They also use up a lot of power, which gets dissipated at some point along the line as heat. Various off-chip generated bias voltages, etc. also can cause issues, especially as the sensor head gets hotter and more current must be drawn.

So CCD's have their shortcoming as well.
Jason Rodriguez is offline   Reply With Quote
Old January 25th, 2008, 02:04 PM   #173
Major Player
 
Join Date: Nov 2007
Location: Athens Greece
Posts: 336
A part from a Micron 2048xsomething CMOS frame I found on the web:

http://img107.imageshack.us/img107/7257/79093717ls7.jpg

It's just not realistic. This could be a bright red car and we will never find out.

On the Silicon Imaging site there is a page with LUT tables. There is a "no look" file and a sample:

http://www.siliconimaging.com/Digita...ds/no_look.zip

I don't believe the camera is desaturating on purpose, so this must be the out of camera saturation. What kind of processing is applied with a look file? Is there saturation processing?
John Papadopoulos is offline   Reply With Quote
Old January 25th, 2008, 02:11 PM   #174
Major Player
 
Join Date: Nov 2007
Location: Athens Greece
Posts: 336
Yes, CCD is harder to design, more expensive and problematic to get right with all the extra components and costs a lot more in development and materials. This is also true for most Italian supercars, still, many people will prefer one of those over a BMW with a equivalent engine:)

EDIT: I think the car analogy suits the situation. We all know that a top of the line BMW might be a better tool for most transport applications compared to something with italian engineering. But the italian car still has its market because many people like the sound of the engine, the engineering mentality, the way these things work and look. And even if the specifications might be similar, the italian car can certainly be a lot more engoyable and handle better in extreme scenarios, even though the engineering is much simpler, the technology is not as advanced and it doesn't come with 20 3-letter acronyms of its various systems/technologies. This type of car is a financial nightmare for any automotive company, but engineers and management know there are reasons to maintain the production.
John Papadopoulos is offline   Reply With Quote
Old January 25th, 2008, 02:46 PM   #175
Trustee
 
Join Date: Mar 2003
Location: Virginia Beach, VA
Posts: 1,095
Quote:
I don't believe the camera is desaturating on purpose, so this must be the out of camera saturation. What kind of processing is applied with a look file? Is there saturation processing?
Definitely . . . if you download the XML, there is a saturation matrix in there, and you can see all the settings that are being applied to the camera image.

In the end I feel that both technologies have their place, with advantages and disadvantages on either side . . . it's not just "marketing" false-hoods that have created the popularity around CMOS as you have described in your other posts. There are advantages, and ways to mitigate the disadvantages.

Choice is a good thing.
Jason Rodriguez is offline   Reply With Quote
Old January 25th, 2008, 02:51 PM   #176
Major Player
 
Join Date: Nov 2007
Location: Athens Greece
Posts: 336
Increasing saturation with post look files does come at a cost though. It's better to get more from the camera directly so you avoid boosting noise etc. I made a comparison of the out of camera, neutral (looks undersaturated to me) and film look.

http://img178.imageshack.us/img178/1217/lookcompdz4.jpg
John Papadopoulos is offline   Reply With Quote
Old January 25th, 2008, 03:09 PM   #177
Trustee
 
Join Date: Mar 2003
Location: Virginia Beach, VA
Posts: 1,095
Yes, it does, but as noted, it's a "mitigated" loss, meaning that for a little more noise you get the "good" saturation we've been talking about, along with the benefits of flexible frame-rates, low-power, high temp tolerance, all data pipeline (on-board A/D converters), optical format compatibility with 2/3" and S16mm, up to 2K resolution, etc., etc.

Technology is always moving, and tomorrow's CMOS will make today's CCD's look bad and vice versa . . . both technologies will have their respective places for sometime as far as I can see.

There is one thing though that I am seeing, and that is a lot more R&D and intellectual property is being applied toward improved CMOS designs than what I'm seeing with CCD . . . I think a lot of this has to-do with the ability for "fabless" firms to design CMOS sensors compared to the difficulties required to create CCD's. As such, I think we will probably see CMOS in the long-run out-pacing CCD design, with the "end-results" being a bit of a "pseudo-CMOS/CCD sensor", that is CMOS designs being created on very high-end mixed-signal processes that are typical of CCD designs. At that point you'll get the advantages of both, with less of the disadvantages of either.
Jason Rodriguez is offline   Reply With Quote
Old January 25th, 2008, 03:35 PM   #178
Major Player
 
Join Date: Mar 2007
Location: Amsterdam The Netherlands
Posts: 200
As you may have gathered I am not trying to make my camera have a certain look and I am taking a more scientific viewpoint. This is why I have taken so long to get the camera output perfectly linear (within 6%) and also get the colors as exact as possible as well.

This would allow the most consistent image in post and give you the most control over the colors.

I think one of the reasons that colors are pretty good already is because of linearity and getting black level correct. I've seen the same thing when calibrating a CRT projector and doing the greyscale tracking using a photosensor and a voltage meter instead of trying to do the same thing by eye.
__________________
VOSGAMES, http://www.vosgames.nl/
developer of Boom Recorder and Mirage Recorder
Take Vos is offline   Reply With Quote
Old January 25th, 2008, 03:43 PM   #179
Trustee
 
Join Date: Mar 2003
Location: Virginia Beach, VA
Posts: 1,095
Nope, you're right Take, and I'm sorry for hijacking your thread . . . I didn't want to get into a CCD vs. CMOS discussion, but just wanted to point out you've definitely done some very fine work here, and the images from your software look really nice.
Jason Rodriguez is offline   Reply With Quote
Old January 25th, 2008, 03:45 PM   #180
Major Player
 
Join Date: Mar 2007
Location: Amsterdam The Netherlands
Posts: 200
I don't mind the thread hijacking.
__________________
VOSGAMES, http://www.vosgames.nl/
developer of Boom Recorder and Mirage Recorder
Take Vos is offline   Reply
Reply

DV Info Net refers all where-to-buy and where-to-rent questions exclusively to these trusted full line dealers and rental houses...

B&H Photo Video
(866) 521-7381
New York, NY USA

Scan Computers Int. Ltd.
+44 0871-472-4747
Bolton, Lancashire UK


DV Info Net also encourages you to support local businesses and buy from an authorized dealer in your neighborhood.
  You are here: DV Info Net > Special Interest Areas > Alternative Imaging Methods


 



All times are GMT -6. The time now is 01:53 AM.


DV Info Net -- Real Names, Real People, Real Info!
1998-2024 The Digital Video Information Network