> unsigned short curve[4][1024]; > ...> pixVal[k]=curve[2*(i&2)+(k&2)][pixVal[k]]; // Assumme BayerThe expression 2*(i&2)+(k&2) can has 0, 2, 4, 6 as the result, but declaration is "curve[4]".Is it supposed to be 2*(i&1)+(k&1)?
Well I finished the coding and run a couple of test...
What does your code do?
How do we add it to CHDK?
Can you post some results for us to see?
This might be an excellent way to "fix" the color shift that happens when averaging RAW images for in-camera HDR. Averaging 3 or 5 bracketed RAW frames seemed to provide some excellent results in another thread where people were testing this. But highlights were getting strongly shifted into magentas/reds (most likely due to not having a proper color profile for RAW import that wasn't expecting that many frames added together needing compensation more accurately).
I hope you don't give up working on this. For the advanced photographer this would be an excellent addition. The more that can be done with some simple and well-tested defaults in our cameras, the less that needs to be done in editing. I for one would love to be able to tone-down the contrast a bit more in my camera (for a simple example). Canon loses too much dynamic range in its JPGs by trying to produce garish "advertising" images to the average consumer.
By the way will there be any performance gain to have this section replaced by inline assembly?The code is supposed to slice an 80 bit bloc into 8 blocs of 10 bits to use them as index to replace those 8 blocs of 10 bits and reassembling the whole thing.I am pretty lame with inline assemble and would need help there.
Excelent toinech!Maybe you want to compile for all cameras so all the people can try it before commiting to trunk. In case there are bugs/suggestions etc.//for all camerasgmake batch-zipHave fun!
Someone told me about this. I had to check. WOW!I was hoping was to make posterization FX where 8 12 or 16 colors are used. Solarization where tone ranges are color inverted. Your curve editor doesn't allow for making straight lines. Stair-step and saw-tooth patterns. A single vertical line for monochromatic FX. Things like that.
Could you change the curve editor to have an option for straight lines point to point? Then all the above would be possible.
It also doesn't allow you to move the end points across the top or bottom to clip highs and lows, only the right and left sides to lower contrast. It could be used for histogram adjusts if end-point movement on the other axis was allowed. You could make a busy background all white to remove it. Great for silhouette portrait shots
I wonder how curves could be made to mimic glass filters. Is there a place online that publishes the curve patterns for glass filters? It wouldn't be too hard to match those shapes with the editor.
Could the curve editor be made part of CHDK? Load edit and save curves right in the camera?