Comparison: CHDKPTP vs Canon's RemoteCapture - RAW Shooting and Processing - CHDK Forum

Comparison: CHDKPTP vs Canon's RemoteCapture

  • 129 Replies
  • 47498 Views
*

Offline SticK

  • *****
  • 779
Comparison: CHDKPTP vs Canon's RemoteCapture
« on: 22 / August / 2012, 17:21:22 »
Advertisements
This post is with gui_context_plus=true in CHDKPTP for the SX110IS.

Please have a look at live viewfinder image quality in the attached.  After enabling the lib, the intensity of severe horizontal artifacts improved significantly.  However, some lower intensity artifacts still remain (red and violet annotations). 

I don't know what the cause of the "out-of-focus" in effect is (yellow annotations), or whether the two might be related.  Because I was careful to focus with the camera LCD, I know the images are OK that way.

First row of screen shots is SCENE 1 and second row is SCENE 2, to demonstrate consistent results.

Is there a way to increase the quality/strength of the interpolator, in X and in Y, regardless of CPU cost?  If possible, I would like to see the best quality result we can get.

*

Offline reyalp

  • ******
  • 14128
Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #1 on: 22 / August / 2012, 22:41:42 »
A note, if you have the "contextplus" stuff correctly configure, you will see
ContexIsPlus iup:true cd:true
in the command prompt window (not the gui console, the command prompt you started from, or created when you launched chdkptp). If you don't see that, then you don't have it set up correctly.

Re the screenshots:
If you turn aspect correct off, then there is no scaling at all. So any artifacts you see are not related to that.

If you have Viewport 1:1 unchecked, then half the Y values are discarded when converting to RGB. If you check it, then you have exactly the data that was received from the camera, only converted from YUV to RGB.

The YUV->RGB conversion is probably not optimal.

I have to say I don't understand the point of this exercise. Given that typical cameras only have 240 lines, you are never going to get great detail. The current implementation is sufficient for composing a shot or getting a general idea of what is in the scene. It's not great for focusing, but no ~240 line display is going to be.

Note that some cameras have modes that are higher resolution. On my a540, 640x480 video mode changes the live view frame buffer to 704x528. Even if you are shootings stills, you could switch back and forth if you really need the viewport resolution for something. Your camera may or may not do this. Plugging something into the video out connector may also change the viewport resolution.
Don't forget what the H stands for.

*

Offline SticK

  • *****
  • 779
Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #2 on: 23 / August / 2012, 01:45:28 »
Please allow me to address your most important comment first ...

Quote "I have to say I don't understand the point of this exercise .... you are never going to get great detail."

I felt you might bring this up.  If you take a *very* close look at the RemoteCapture image, you will find it is sharper by comparison to the CHDKPTP screen shots.   While I agree that most photographic needs may not require that high a performance, my line of thinking is why not provide it if it is being delivered out of the CCD as RemoteCapture says, despite its own conversions to the data as you outlined in an earlier post.  Furthermore, in my specialized instrument (where this SX110 is destined if CHDKPTP can provide the performance) I don't use autofocus, in fact, I don't use the lens at all.

Quote  "if you have the "contextplus" stuff correctly configure, you will see
ContexIsPlus iup:true cd:true"

Yes that is correct, in the DOS window.  In fact it is also easy to see the difference between the stock and contextplus version viewports because the jaggies are very severe in the stock version, and obviously improved in the context plus version.

Quote "If you turn aspect correct off, then there is no scaling at all. So any artifacts you see are not related to that."   ....    "If you have Viewport 1:1 unchecked, then half the Y values are discarded when converting to RGB. If you check it, then you have exactly the data that was received from the camera, only converted from YUV to RGB."

Your comments prompted me to do an another experiment.  This time I kept the native resolutions intact.  Panel A is native 360x270, Viewfinder 1:1 unchecked.  Panel B was created by a) checking Viewfinder 1:1, b) taking screen shot, c) resizing to 50% in Microsoft Paint, and d) pasting into attachment.  Panel C is native RemoteCapture 320x240.

Although I thought CHDKPTP panel B could be better than A, both appear very similar.  In RemoteCapture panel C you can best see JPEG artifacts in the background of the cables circled red.  I claim that the RemoteCapture image is sharper than the CHDKPTP images.  Your images are clean and free of artifacts, at native resolution.  I was wondering if the sharpening in RemoteCapture could be the result of the JPEG artifacts.  What is your opinion?

Overall, this test shows that CHDKPTP live images cleaner and artifact free, but RemoteCapture is sharper.  Hmmm.   Any thoughts?


*

Offline reyalp

  • ******
  • 14128
Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #3 on: 23 / August / 2012, 03:41:23 »
I felt you might bring this up.  If you take a *very* close look at the RemoteCapture image, you will find it is sharper by comparison to the CHDKPTP screen shots. 
I'm not asking whether they are different, I'm asking in what application does the difference actually matter ?

If I could just snap my fingers and make it better I would, but in reality I have limited time.
Quote
Furthermore, in my specialized instrument (where this SX110 is destined if CHDKPTP can provide the performance) I don't use autofocus, in fact, I don't use the lens at all.
So is the quality of the viewport image critical ? If so, using a device with a 216 line output is probably not a good choice. What sort of instrument is this ?
Quote
Panel A is native 360x270, Viewfinder 1:1 unchecked.  Panel B was created by a) checking Viewfinder 1:1, b) taking screen shot, c) resizing to 50% in Microsoft Paint, and d) pasting into attachment.  Panel C is native RemoteCapture 320x240.
If you are going to scale it yourself, you might as well take chdkptp scaling out of the equation completely: Start with the aspect correct off, viewport 1:1 (720x216) image, aspect correct by scaling it to something large, e.g. 1440x1080 and then scale it back down to 360x270. Gimp may be preferrable to paint...
Quote
I was wondering if the sharpening in RemoteCapture could be the result of the JPEG artifacts.  What is your opinion?
No particular opinion. However, I would note that the Canon image processing pipeline certainly has the capability to apply sharpening to still jpegs, so it wouldn't be a surprise if they applied it remote capture too.
Quote
Overall, this test shows that CHDKPTP live images cleaner and artifact free, but RemoteCapture is sharper.
The scaling done with contextplus may look smoother than the other method because it's doing some smoothing, not because it's preserving the data better.

It's also possible the the YUV/RGB conversion isn't optimal.
Don't forget what the H stands for.

*

Offline SticK

  • *****
  • 779
Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #4 on: 23 / August / 2012, 09:35:44 »
Your fine dedication to CHDK is notable and much appreciated.  That's why this entire package is so good, but understandably, is still under development.  I think that unless there are obvious gross bugs like the one you addressed with A/R which from the sky-view needed a 2-stage resolution, then I feel addressing more refined areas in a snap of a finger is not often the best approach anyway.  On the other hand, discussing these seemingly silly issues however sheds light on what is possible for me, gives you a better understanding of my requirements, and hopefully implants some thought seeds for you if we can meet on common ground.  Then a good prudent approach can be developed that can better suit your priority schedule, and naturally your judgment of a new or enhanced feature fit in the global requirements.

Quote "So is the quality of the viewport image critical ?"

Yes it is, very critical.  Depth of field is measured in units of microns.  RemoteCapture is just on the positive edge of the border of being acceptable.  From the last comparison image, the result that came out yesterday is stunning compared to what it was just a few days ago, but still is just on the negative edge of being acceptable.  Thus I am primarily interested in three functions: RAW image, liveview, and the ability to operate the camera in manual mode remotely (setting exposure profiles, Tv, Ev, digital zoom, and shooting -- essentially a mix of ptpCamGUI and CHDKPTP, for the SX110).  My instrument currently uses an S50 CCD, but that camera has both liveview and RAW capability transfer with RemoteCapture.  The SX110 however does have the liveview but does not have RAW out-of-box.  That's where your CHDK comes in.

Quote "If so, using a device with a 216 line output is probably not a good choice."

This is a good point.  Andor makes scientific cameras that could be used in my application with 640x480 liveview at 30 fps, but they are all monochrome, among several other technical drawbacks that make them unsuitable for my application.  Hence commercial scientific cameras cannot be used.  I designed this instrument to be very compact and flyable, and therefore it relies on small CCDs, ie 1/2.5" to 1/2" range, and those, complete with readout and data transfer electronics that I don't have to worry about, are only available in small consumer cameras.  For a prototype instrument that is intended to validate basic functionality and scientific objectives, that's good enough.

Quote  "What sort of instrument is this ?"

It is a microimager, something like MAHLI on MSL, but much more sophisticated.  Because I have a publication pending, that is all I can say in a forum.  If we chat privately, I can tell you more.

Quote "If you are going to scale it yourself, you might as well take chdkptp scaling out of the equation completely"

I did the scaling in the center panel to test a simple hypothesis and demonstrate the results to you (and to me too).  The final objective would be for the liveview to provide a crisp image, not to take CHDKPTP out.

Quote "Start with the aspect correct off, viewport 1:1 (720x216) image, aspect correct by scaling it to something large, e.g. 1440x1080 and then scale it back down to 360x270."

That's a good idea ... I have a tool that does Lanczos interpolation and will try it, but again, that would be a concept test and is not meant to replace chdkptp.

Quote.  "Canon image processing pipeline certainly has the capability to apply sharpening to still jpegs, so it wouldn't be a surprise if they applied it remote capture too."

Thank you for this insight, and that is more probable than a side-effect of JPEG artifacts.  I agree.

Quote "It's also possible the the YUV/RGB conversion isn't optimal."

It is strange that Canon chose this archaic TV format.  I really wonder why // perhaps because their cameras support video // speculating.  It is amazing to me how you managed to dig that out.  Nonetheless, could something in your routines related to the conversion have an impact on image quality, and give clarity a little boost?

Thank you for your help.

*

Offline SticK

  • *****
  • 779
Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #5 on: 23 / August / 2012, 12:42:41 »
Here are the results to your suggestion.  I used RAWTherapee 4 (I find GIMP difficult to use).  The difference between what you suggested is that here I scaled the chdkptp original 720x216 by 2X instead going to a 4:3 A/R right away.  The reason is that I can't seem to get RAWTherapee to operate on W & H independently, even though it has that option (a bug?).  Thus to scale back down to 360x270, I used Paint, which in my experience does OK.

Fig 1, center panel.  Direct scaling up with Lanczos interpolation on the way up, follow by down scale.

Fig 2, center panel.  Mild unsharp mask applied between the Lanczos image in Fig 1 center, before down scale.

The figures are coregistered so you can see the differences better in the center panel by flipping them in a viewer.

Please let me know what you think.

*

Offline srsa_4c

  • ******
  • 4451
Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #6 on: 23 / August / 2012, 15:12:32 »
@SticK
By looking at your screenshots I get the feeling that Canon's remote live view works with a source vertical resolution about twice as much than what the regular live view provides in shooting mode. CHDK can't do this, you only have those 216 lines, you can't get detail which isn't there.
What you need to understand is, the camera's remote controlled mode (which is what you see when you use RemoteCapture) is something that's independent of the regular shooting mode every camera has. This mode has many specialities (the camera generates MJPEG frames from the live feed the CCD provides, the shooting code is different, you have the option not to use the card for shooting), which are not present in a camera without Canon's remote control support. Since Canon seems to have dropped support for this years ago in their compacts, it's unlikely that CHDK will ever support it.
That means, we can only use features which are available in every camera. That limits CHDK remote live view to what the camera provides as live view. In your case (SX110), it has the lowest vertical resolution I've seen. You could try to see whether plugging something into the TV-out connector changes this, as reyalp suggested.
The only higher resolution live feed CHDK could use is only available in movie mode, but currently there's no support for that.
I can imagine that cameras with HDMI output may provide bigger live view resolutions even in shooting mode.

*

Offline SticK

  • *****
  • 779
Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #7 on: 23 / August / 2012, 15:27:09 »
I noted that with all the running around between two computers, switching camera cables, and getting used to working with unusual size formats etc, I made an error in the captions.  Where it read "720x540" it should read "720x216".  That makes more sense and addresses reyalp's suggestion, but, my process was correct, it was just a label mistake so there is no change to the images.

For your future reference, here they are with captions corrected and added, shown in violet.

 

*

Offline SticK

  • *****
  • 779
Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #8 on: 23 / August / 2012, 15:54:57 »
@srsa_4c

Quote "Canon's remote live view works with a source vertical resolution about twice as much than what the regular live view provides in shooting mode"

That is a very interesting point.  If I understand you correctly, when *Canon* operates live view, they use something like 432 lines, and you're saying you don't have access to that mode.

If so, that seems to agree with the following, and also with my remark in blue in [16].

Given the amount of image quality push I had to do to plate [16] center panel 720x216, and yet it still is slightly inferior to RemoteCapture, your explanation seems to me plausible.  Taking it a step further, even though JPEG artifacts are visually obvious in RemoteCapture, their resolution is still visually notably better to CHDKPTP even when pushed in [16] w/o JPEG artifacts.  I am on the right track?

Quote "That limits CHDK remote live view to what the camera provides as live view. "

Is my understanding correct?  What you mean is "... provides as live view [to its LCD as opposed to RemoteCapture]" ?

I am not familiar with other modes, like video, so I would have to explore them to test your suggestions.  If a special video cable is needed I would not have it. 

By the way, movie mode is not required by my application.

*

Offline srsa_4c

  • ******
  • 4451
Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #9 on: 23 / August / 2012, 16:20:06 »
That is a very interesting point.  If I understand you correctly, when *Canon* operates live view, they use something like 432 lines, and you're saying you don't have access to that mode.
You can only get there using Canon's ptp commandset, which we do not use.
Quote
Given the amount of image quality push I had to do to plate [16] center panel 720x216, and yet it still is slightly inferior to RemoteCapture, your explanation seems to me plausible.  Taking it a step further, even though JPEG artifacts are visually obvious in RemoteCapture, their resolution is still visually notably better to CHDKPTP even when pushed in [16] w/o JPEG artifacts.  I am on the right track?
As you can actually see that setup, you should know better. I can only see screenshots with artifacts.
Quote
Quote "That limits CHDK remote live view to what the camera provides as live view. "

Is my understanding correct?  What you mean is "... provides as live view [to its LCD as opposed to RemoteCapture]" ?
Correct. (to the LCD or the connected TV)
Quote
I am not familiar with other modes, like video, so I would have to explore them to test your suggestions.  If a special video cable is needed I would not have it.
No special cable is needed (usually you get one with the camera anyway), you can use a toothpick* or something :)
* non-conductive :)
BTW, I wouldn't expect much higher resolution in movie mode either (LCD/Tv-out will continue to use the same framebuffers with probably unchanged resolution).
Quote
By the way, movie mode is not required by my application.
I understand, but that would be the only way to get higher res. live view (and it isn't implemented, as I wrote).
« Last Edit: 23 / August / 2012, 16:23:39 by srsa_4c »

 

Related Topics


SimplePortal © 2008-2014, SimplePortal