Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - martinhering

#76
New version 0.1.3 (89) available:


  • Fixed crash when changing frame rate on 10.11
  • Improved 10/12 bit image aliasing and banding by upsampling

Please try especially 10 bit and 12 bit content.

https://rink.hockeyapp.net/apps/3ed6ecf60e684239a6aba3d407cf3935/app_versions/36
#77
About the 10 bit. Yes, I could now confirm that. I am now just shifting the pixel values 4 bits to the left and thus feed a 14bit image to Apple's raw engine and the result is totally different:


http://fs.footageformac.com/tests/apple_raw_10vs14bit.png

It also helps a lot in terms of aliasing:


http://fs.footageformac.com/tests/aliasing_10vs14bit.png
#78
10bit works for you reddeercity? I upgraded to Version 78 although 10 bit files are still looking very dark in the preview. On 5D3 – am I doing something wrong?

I can reproduce the issue. When I crank up the exposure, I also get a lot of banding artefacts. I think the Apple RAW engine does not really know how to deal with 10bit RAW properly. This gets weirder and weirder every day. No wonder they canceled Aperture. I will try to convert the 10bit RAW into 14bit RAW first before handing it to the Apple APIs and see if I need to add some slight noise to avoid banding. We'll see.
#79
New Version 0.1.2 (85) available:

- Added changing image aspect ratio
- Added changing frame rates (for slow motion, no audio)
- Added focus pixel filtering for 650D and 700D
- Fixed white balance picker
- Fixed crashes on 10.11 by switching rendering to OpenGL
- Fixed crash during export on 10.11

As usual, update with "Check for updates" menu or directly from here:
https://rink.hockeyapp.net/apps/3ed6ecf60e684239a6aba3d407cf3935/app_versions/34
#80
QuoteSeparating focus pixels into red and blue maps is intriguing. Does it work in all cases? Reason I ask is because it seems that the pixels change colors depending on the lighting.

Well I did not find any downsides yet. I also think that separating the channels for correction yields better image quality, since you are only repairing 1 pixel and not its surroundings. I played a bit with the interpolation matrix and I think an average of the 8 surrounding pixels is good enough, but you need to make sure that the surrounding pixels are not dead pixels. I just leave them out and average the remaining pixels.

QuoteHere's an example from the edge of a frame from the 100D. Note that this is also showing focus pixels outside of the area that you are covering with your maps.

Do you still have the MLV? The reason, why I use the MLV is, that I can separate the components and save a grayscale image for every component (I could also do this with DNGs, but I dont have a decoder yet). I can then use the "Threshold" tool in Photoshop to extract the bad pixels. Very simple. I save the BW image as an 8bit png with 2 colors (2kb max). Then I read in the pixel map and create a table with x and y values for red and blue (there seem to be no focus pixels in green) and iterate over the table and fix the pixels. This way I can always simply open the BW png in PS and map out new pixels on the go and never need to change the code. Very fast turnaround. I can also use component images of new MLVs and overlay the existing pixel map and map out new pixels this way. Very easy.

QuoteOne last note -- have you looked into Dual ISO support for your app? Fixing focus pixels on Dual ISO is especially tricky. Read through the Dealing with Focus Pixels in raw video topic to find out why.

Not yet. I am also postponing that. I first need to give my app some more useful features like histogram and RGB parade, thumbnail grid, etc.
#81
QuoteThose new pixel maps are not covering all the possible focus pixels. Believe me, I've been there.

OK, since it is hard to get a good shot that covers all focus pixels, I deal with that once I have footage that needs better pixel maps. So far, I am satisfied with the result.

QuoteSure -- uploaded to that same dropbox folder.

These helped a lot. Thank you. I am using the same pixel maps for 650D, 700D and EOS-M now. Seems to work.
http://fs.footageformac.com/index.php?dir=focus_pixels/pix_maps

The crop-rec module gives the same raw buffer size than mv720 mode, I think, so it's kinda hard to come up with an auto-detection. But since the module is currently experimental, I am postponing this issue as well.
#82
Thanks for the info. I could get some footage on the EOS-M in zoom mode and and made some new pixel maps:
http://fs.footageformac.com/index.php?dir=focus_pixels/pix_maps

For the mode auto-detection I did this to cope with the crop rect in zoom mode:

        FTRawImageFocusPixelsType type = kFTRawImageFocusPixelsTypeEOSM;

        NSInteger rawBufWidth = (block.cropPosX > 0) ? 80 + raw_info->width + (block.cropPosX-80)*2 : raw_info->width;
        NSInteger rawBufWidthZoomRecording = (block.cropPosX > 0) ? 128 + raw_info->width + (block.cropPosX)*2 : raw_info->width;
        if (rawBufWidth == 1808) {
            type |= kFTRawImageFocusPixelsType1808x728;
        }
        else if (rawBufWidth == 1872) {
            type |= kFTRawImageFocusPixelsType1872x1060;
        }
        else if (rawBufWidth == 2592 || rawBufWidthZoomRecording == 2592) {
            type |= kFTRawImageFocusPixelsType2592x1108;
        }


Seems to work.

I could not check your silent pictures, since I don't have a DNG decoder yet. I always take the silent pictures in MLV format. Can you do some MLV silent pictures with your 700D in all modes? Thank you.

I could not get mv1080 mode working on EOS-M. Recording in H.264 doesn't make sense obviously. And silent pictures either return mv720 or mv1080crop mode buffers.
#83
One more thing:

QuoteWhat would really help is a better way to blend the pixels. Your idea of changing the colors is interesting, are you interpolating just one color channel surrounding a focus pixel?
A problem with blending surrounding pixels comes up when there are high contrast sharp lines like in this shot from a 100D:
I'm not sure what will work for situations like this. What helps is to combine chroma smoothing along with the focus pixel map but even that isn't enough in some cases.

Yes, I am correcting focus pixels on the actually raw buffer itself and I am just interpolating surrounding pixels from the same channel. About the false colors in sharp lines, I read some stuff about it and I think that this is a problem with the demosaicing itself. Hence Amaze which reduces aliasing. Since I cant change the demosaicing method of the Apple RAW engine at the moment, I might be able to find a solution in post. Something like chroma smoothing in areas around edges. I think it should be possible to come up with some GPU code.
#84
QuoteI'm still scratching my head at how these work because some of the maps have pixels next to each other on the horizontal axis, others are missing sections and still others have focus pixels mapped in areas that we know there can't be any focus pixels because that it is an inactive area of the raw buffer. There are also some video modes that are missing, like zoom mode which has a full raw buffer size of 2592x1108 and can move around the sensor

I actually bought a used EOS M on ebay and did some silent pictures, and yes, I mapped out some pixels in the inactive area, I will correct that. You're right. I only checked fullframe and crop mode yet, since I could not find the other modes. The settings are kinda convoluted. I'll check the crop_rec module though and see if I can find other circumstances that produce focus pixels pattern I am not taking care of yet. Were can I set up "Zoom Mode"? I could not find the freakin setting. Also dolly mode on the EOS M is really unusable. It uses buttons that are normally used for other stuff. So I guess that this is not something that is in wide spread use.

QuoteI ended up just stacking all 21 raw buffers in Photoshop. This might be overkill because if the raw buffer happens to be at the top or bottom of the sensor it might be in an area that doesn't have any focus pixels but since we don't know the position of the raw buffer on the sensor we need to account for all possible locations.

This does not sound correct. Is this just a thing with dolly mode?

QuoteI've got a 700D and can provide you with test footage for all the video modes. I believe I read somewhere that you needed a blank wall at a certain exposure, could you please post exactly how you would like the tests shot?

I think you said that 700D, 650D and EOS M experience the same patterns, so I would just need one file in every mode to confirm that. Already thinking of buying more camera on ebay :-) If you could provide the silent pictures, that would be awesome. BTW do you have a Mac? Can you test my app?
#85
QuoteIs anyone else having the 'pink-tint' all over / and crashing when selecting whitepicker tool in El Capitan (10.11.6) ?

About the crashes. It seems that Metal was still a bit unstable in 10.11. I'll be changing it to OpenGL rendering. Hope this helps.

What do you actually mean with 'pink-tint'? Do you mean "magenta highlights"? You can reduce these using the last slider on the right. Or do you mean something totally different? Screenshot?
#86
Does anybody know what actually causes these Focus Pixels? Is it the sensor or the processor? And why do only the models with the DIGIC 5 processor show these?
#87
Here are the focus pixel maps, I extracted so far:

https://www.dropbox.com/s/e42a015uoeabbv4/Focus-Pixels.zip?dl=0

Seem to work great with silent pictures and any video I came across yet. I am also trying to detect which pixel map to apply automatically, which seems to work so far:


    if (_idntInfo.cameraModel == kMLVCameraModelEOSM) {
        FTRawImageFocusPixelsType type = kFTRawImageFocusPixelsTypeEOSM;

        NSInteger rawBufWidth = (block.cropPosX > 0) ? 80 + rawInfo->width + (block.cropPosX-80)*2 : rawInfo->width;
        if (rawBufWidth == 1808) {
            type |= kFTRawImageFocusPixelsType1808x728;
        }
        else if (rawBufWidth == 1872) {
            type |= kFTRawImageFocusPixelsType1872x1060;
        }

        [_rawImage fixFocusPixelsWithType:type withCropX:block.cropPosX: block.cropPosY];
    }
    else if (_idntInfo.cameraModel == kMLVCameraModel100D) {
        FTRawImageFocusPixelsType type = kFTRawImageFocusPixelsType100D;

        NSInteger rawBufWidth = (block.cropPosX > 0) ? 64 + rawInfo->width + (block.cropPosX-64)*2 : rawInfo->width;
        if (rawBufWidth == 1808) {
            type |= kFTRawImageFocusPixelsType1808x1190;
        }
        else if (rawBufWidth == 1872) {
            type |= kFTRawImageFocusPixelsType1872x1060;
        }
        [_rawImage fixFocusPixelsWithType:type withCropX:block.cropPosX: block.cropPosY];
    }



I have yet to test the 650D and 700D though.
#88
@DeafEyeJedi

WOW. Thank you for your feedback.
#89
@dia3olik

QuoteIs it possible to implement a way to copy and paste developing settings from one file to another of the list?

It would help with multiple takes or clips taken in the same lighting conditions...

That should already work.
#90
@Ilia3101

Fixed that. Please use build 78:
https://rink.hockeyapp.net/apps/3ed6ecf60e684239a6aba3d407cf3935/app_versions/29

QuoteI have a question, as it uses the apple RAW engine and all that(I'm guessing same as Apple Photos), and I've found from experience that Apple's demosaicing has never been that great compared to Adobe and amaze, what do you think about implementing amaze demosaicing?

I already thought about that. Since 10.12 it is actually possible to add your own CPU code to Core Image filters, so implementing Amaze should be possible. But that's not on the priority list at the moment. But at some point, I will try to do that.
#91
QuoteDo you have a "vertical stripes fix" in mind?

My 5D Mark III does not show the problem of vertical stripes. Do you have this? Can you send me a sample MLV file that shows the problem?
#92
There is a new version out: 0.1.1 (77)
https://rink.hockeyapp.net/manage/apps/477081/app_versions/29

Change log:
- Improved white balance handling
- Added white balance picker
- Added filter for reducing discolored highlights
- Added 'Copy Image' menu item to copy current image into clipboard
- Added support for 10 and 12 bit RAW
- Added correction of dead pixels
- Added correction of focus pixels for EOS-M and EOS 100D
- Backported to 10.11 El Capitan

Please try it out. Especially correction of focus pixels and dead pixels. Thank you.

Also I need sample files (preferably silent images) from the 650D and 700D. If anybody can provide that, that would be nice. Thank you.
#93
My focus pixel correction is working:



Thank you for your support.
#94
QuoteWill you start selling this app in the future?

Yes, I intend to. But only as soon as the app has enough compelling features. Until then the app will be free.
#95
Quoteprobably need chroma smoothing for all bit depths. then sharpen.

Could also be that it has something to do with fullframe mode vs crop mode. Does fullframe mode scale the channels in camera? That could also result in pixel components being off slightly. I noticed that crop mode does not result in a stretched image. I'll test that out tomorrow.
#96
@dfort

Thank you for your summary. That was very helpful. I was able to extract all the focus pixels now using the silent module. The pixels for red and blue also now line up.

QuoteA problem with blending surrounding pixels comes up when there are high contrast sharp lines like in this shot from a 100D:

I have the same problem on my EOS M. It comes up when using Apple's Raw Engine and when using the Adobe one. Though I only tested 10 bit mode. Do you have this problem in 14 bit mode as well?
#97
Here are the red and blue tiffs:

R: https://www.dropbox.com/s/3430fvt3dufjlx3/1600x540_red.tiff?dl=0
B: https://www.dropbox.com/s/ffzkeucgwcgbcul/1600x540_blue.tiff?dl=0

and here's the corresponding MLV:
https://www.dropbox.com/s/ro5n385c29xtjxz/1600x540.MLV?dl=0

I found out that you basically need to record one map for fullframe mode and one for crop mode as the pixel layout seems to differ. The map for a particular resolution can be deferred from the map with the highest resolution as the frame is centered around the sensor center point. I'll implement a correction function in the next days that'll take the pixel map and interpolate the bad pixels. Should work.
#98
QuoteThe 70D doesn't show focus pixels but the 100D has a boatload.

Yes, I can confirm that. However your 70D has lots of hot/dead pixels in all channels. Here are some images of the channels as their 8bit linear representation.

R: https://www.dropbox.com/s/6vc80iqc7igafq8/raw_red.tiff?dl=0
G: https://www.dropbox.com/s/t7i1min1830x8ez/raw_green.tiff?dl=0
B: https://www.dropbox.com/s/d9f8pdxxnvne3kp/raw_blue.tiff?dl=0

The good news is that their value is way below the black_level, which should be detectable fairly reliably.

The 100D has indeed a lot of focus pixels. I'll check your MLVs and see if I can reconstruct the pixel map.
#99
Thanks. I checked out a few files. But they are not very suitable for focus pixel map extraction.

Short tutorial:
Remove the lens and point the camera to the sky or put a white paper in front of the camera. Then expose the image so that you have 98% white on screen. The white should not clip. I just need 1 frame. You can stop after 1 second. Also I need the highest resolution possible with the camera in fullframe and crop mode.

UPDATE:
I found a few suitable files. But is this the highest possible resolution? Can you tell me the resolution and mode you have been recording which files with?
#100
I am extracting the red, green and blue channel from the raw_buffer and saving them as 8-bit grayscale tiff files. Then I use photoshop to change the colors. Pretty straight forward.

Here's the code. Don't know if that's of any use:


    size_t halfW = _rawInfo.width/2;
    size_t halfH = _rawInfo.height/2;

    CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericGrayGamma2_2);
    size_t bytesPerPixel = 1;
   
    CGContextRef redBP = CGBitmapContextCreate(nil, halfW, halfH, 8, halfW*bytesPerPixel, colorSpace, kCGImageAlphaNone);
    uint8_t* redPtr = CGBitmapContextGetData(redBP);

    CGContextRef blueBP = CGBitmapContextCreate(nil, halfW, halfH, 8, halfW*bytesPerPixel, colorSpace, kCGImageAlphaNone);
    uint8_t* bluePtr = CGBitmapContextGetData(blueBP);

    CGContextRef greenBP = CGBitmapContextCreate(nil, halfW, _rawInfo.height, 8, halfW*bytesPerPixel, colorSpace, kCGImageAlphaNone);
    uint8_t* greenPtr1 = CGBitmapContextGetData(greenBP);
    uint8_t* greenPtr2 = greenPtr1 + halfW;

    register int32_t x, y, yadj, xadj, gadj;
   
    yadj = (_rawInfo.cfa_pattern == 0x01000201) ? 1 : 0;
    xadj = (_rawInfo.cfa_pattern == 0x01020001) ? 1 : 0;
    gadj = (_rawInfo.cfa_pattern == 0x02010100) ? 0 : 1;

    for (y=0; y<_rawInfo.height; y+=2) {
        for (x=0; x<_rawInfo.width; x+=2) {
            int32_t r = get_raw_pixel(&_rawInfo, _rawBuffer, x+xadj, y+xadj);
            int32_t g1 = get_raw_pixel(&_rawInfo, _rawBuffer, x+1-gadj, y);
            int32_t g2 = get_raw_pixel(&_rawInfo, _rawBuffer, x+gadj, y+1);
            int32_t b = get_raw_pixel(&_rawInfo, _rawBuffer, x+1-xadj, y+1-yadj);

            uint8_t r8 = raw_to_8bit_linear(r, &_rawInfo);
            *redPtr = r8;

            uint8_t b8 = raw_to_8bit_linear(b, &_rawInfo);
            *bluePtr = b8;

            uint8_t g18 = raw_to_8bit_linear(g1, &_rawInfo);
            *greenPtr1 = g18;

            uint8_t g28 = raw_to_8bit_linear(g2, &_rawInfo);
            *greenPtr2 = g28;

            redPtr++;
            bluePtr++;
            greenPtr1++;
            greenPtr2++;
        }

        greenPtr1 += halfW;
        greenPtr2 += halfW;
    }

    CGImageRef redImageRef = CGBitmapContextCreateImage(redBP);
    NSImage* redImage = [[NSImage alloc] initWithCGImage:redImageRef];
    [[redImage TIFFRepresentation] writeToFile:@"~/raw_red.tiff" atomically:YES];

    CGImageRef blueImageRef = CGBitmapContextCreateImage(blueBP);
    NSImage* blueImage = [[NSImage alloc] initWithCGImage:blueImageRef];
    [[blueImage TIFFRepresentation] writeToFile:@"~/raw_blue.tiff" atomically:YES];

    CGImageRef greenImageRef = CGBitmapContextCreateImage(greenBP);
    NSImage* greenImage = [[NSImage alloc] initWithCGImage:greenImageRef];
    [[greenImage TIFFRepresentation] writeToFile:@"~/raw_green.tiff" atomically:YES];


So far I only found focus pixels in the red and blue channel.