What is the difference between -raw and -dng in CHDK PTP??? - page 2 - General Discussion and Assistance - CHDK Forum

What is the difference between -raw and -dng in CHDK PTP???

  • 24 Replies
  • 4396 Views
Re: What is the difference between -raw and -dng in CHDK PTP???
« Reply #10 on: 05 / June / 2023, 00:08:15 »
Advertisements
So, it is possible to get a higher resolution this way?

I noticed that in photo mode, I had to select the settings to have my live view at 360x240, so it looked correct but when I switched to video mode, suddenly a massive bottom piece cropped, and it became stretched vertically, so I had to change the settings so the live view was being shown at 720x240 according to the verbose output. But for some reason, it looks awful. I performed a lvdumpimg -count=1 -vp=liveviewdumps3is.ppm and it is always giving a 720x240 PPM image, but looks nasty. I'm confused... I thought lvdumpimg was supposed to capture the RAW live view image. Is it actually 720x240, or am I doing something wrong? Or is it supposed to look like that? Because if I can get 720x540, I consider that a significant improvement in quality. :)



*

Offline reyalp

  • ******
  • 14110
Re: What is the difference between -raw and -dng in CHDK PTP???
« Reply #11 on: 06 / June / 2023, 00:37:49 »
I noticed that in photo mode, I had to select the settings to have my live view at 360x240, so it looked correct but when I switched to video mode, suddenly a massive bottom piece cropped, and it became stretched vertically, so I had to change the settings so the live view was being shown at 720x240 according to the verbose output.
Which camera are you using, S3IS? That sounds like the CHDK functions that get all the dimensions aren't fully implement. This is common, because there's a lot of variation between cams. If you confirm which camera and firmware version and are willing to test, I can probably fix it.

Quote
Is it actually 720x240, or am I doing something wrong? Or is it supposed to look like that?
Because if I can get 720x540, I consider that a significant improvement in quality. :)
This is most likely due to the incomplete implementation. If this is one of the cameras that does 720x540 live view in video, you should be able to get that over PTP at least. Though we don't know it's actually captured at that resolution, it's conceivable Canon could be capturing at 640 and upscaling to 720 for the display.
Don't forget what the H stands for.

Re: What is the difference between -raw and -dng in CHDK PTP???
« Reply #12 on: 06 / June / 2023, 01:26:05 »
Quote from: reyalp
Which camera are you using, S3IS? That sounds like the CHDK functions that get all the dimensions aren't fully implement. This is common, because there's a lot of variation between cams. If you confirm which camera and firmware version and are willing to test, I can probably fix it.

That is correct, the Canon PowerShot S3IS. It is my prized possession. :)
My current CHDK Build is CHDK 1.4.1. Revision 5167. FW Vers: 100a. Compiler: GCC 4.9.3.
My CHDK PTP is chdkptp-r964-win-x86_64

Quote
This is most likely due to the incomplete implementation. If this is one of the cameras that does 720x540 live view in video, you should be able to get that over PTP at least. Though we don't know it's actually captured at that resolution, it's conceivable Canon could be capturing at 640 and upscaling to 720 for the display.

I don't know... When I did the rmem dump thing, some of those buffer images seem to have a width of "1848pixels" and a height of, around the same. It seems to look like it has a great resolution, although I might be doing something wrong. :)


Then again, I'm not exactly a genius like most guys here. I'm mostly specialized in dumping and reverse engineering 1980s arcade cabinet ROM data, and extracting image sprites. This is the same process that I am doing on the RAW data I rmem'ed from the camera. :P
« Last Edit: 06 / June / 2023, 01:28:56 by blenderbach »

*

Offline reyalp

  • ******
  • 14110
Re: What is the difference between -raw and -dng in CHDK PTP???
« Reply #13 on: 07 / June / 2023, 01:34:32 »
Here's a test build for s3is 100a. It should hopefully get the viewport dimensions right, except in stitch assist mode. Please check playback, a still shooting mode like M, and video.

Note some things have changed since 1.4 (though not much core functionality), you might want to save your existing build and CFG just in case.
Don't forget what the H stands for.


Re: What is the difference between -raw and -dng in CHDK PTP???
« Reply #14 on: 07 / June / 2023, 02:30:20 »
I installed the CHDK on a new fresh SD Card, and hooked it up to my CHDK PTP and did "lvdumpimg -count=1 -vp=lives3ismanual.ppm" in Manual mode.


And "lvdumpimg -count=1 -vp=lives3isvid.ppm" in Video mode.


It's weird.

*

Offline reyalp

  • ******
  • 14110
Re: What is the difference between -raw and -dng in CHDK PTP???
« Reply #15 on: 07 / June / 2023, 03:18:52 »
It's weird.
Looks like I made a mistake, try this one.

Note that lvdumpimg does not do any aspect ratio correction, and (before digic 6) the Canon displays generally don't use square pixels, so even if it is right, the images will appear distorted. To check the whether the live view matches the physical camera display, using the GUI with "Scale for AR" checked is better.
Don't forget what the H stands for.

Re: What is the difference between -raw and -dng in CHDK PTP???
« Reply #16 on: 07 / June / 2023, 17:59:28 »
So umm. In standard photo modes, the lvdumpimg is 720x240, which makes me edit the image by stretching it vertically to reach 720x540. However, it looks nasty. Worse than the 640x480 native video. Why?  https://cdn.discordapp.com/attachments/1053116980451876986/1116042579453165568/720x540CanonS3IS0001-0500.mp4

*

Offline reyalp

  • ******
  • 14110
Re: What is the difference between -raw and -dng in CHDK PTP???
« Reply #17 on: 07 / June / 2023, 19:57:43 »
So umm. In standard photo modes, the lvdumpimg is 720x240,
720x240 is normal for still mode live view on cameras of that era. What does the second build (s3is-100a-1.7.0-6247-reyalp-lv-test2.zip) I posted above do in video mode?

Quote
However, it looks nasty. Worse than the 640x480 native video. Why?  https://cdn.discordapp.com/attachments/1053116980451876986/1116042579453165568/720x540CanonS3IS0001-0500.mp4
Live view is generally fairly nasty, but if the video is supposed to show something specific, I don't know what it is.
Don't forget what the H stands for.


Re: What is the difference between -raw and -dng in CHDK PTP???
« Reply #18 on: 07 / June / 2023, 20:40:30 »
In video mode, it clips a lot of the bottom part of the frame, so it gets stretched vertically, so I have to disable Scaling which makes it very wide.

But why is live-view nasty while the video I film on the camera itself, looks better?

*

Offline reyalp

  • ******
  • 14110
Re: What is the difference between -raw and -dng in CHDK PTP???
« Reply #19 on: 07 / June / 2023, 21:35:28 »
In video mode, it clips a lot of the bottom part of the frame, so it gets stretched vertically, so I have to disable Scaling which makes it very wide.
Thanks. Found one more thing I missed. New build attached. Please let me know what resolution it ends up using in video mode, and whether it's cut off.

Quote
But why is live-view nasty while the video I film on the camera itself, looks better?
Why shouldn't it? If you think there's some defect in how live view is rendered, you'll have to be more specific about what you mean by "nasty". If you're just observing that hack rendered, uncompressed 720x240 YUV411 is uglier than factory 640x480 mpjeg video, I don't think that should be a surprise.
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal