Crop image - function - Feature Requests - CHDK Forum

Crop image - function

  • 8 Replies
  • 3471 Views
*

Offline m2tk

  • **
  • 50
  • Sheet happens ...
Crop image - function
« on: 11 / April / 2008, 17:30:27 »
Advertisements
hi,
in my old good fuji finepix i had a nice function to crop taken photos, do we have sth like that in chdk, i have not found..

i.e field photo was taken in 8MP and we need only face of person standing there, we can then zoom in review mode to that face and save it smaller saving the space and clarity (do not need to zoom again to see the face).

thx
S5IS 1.01bc

Re: Crop image - function
« Reply #1 on: 11 / April / 2008, 18:08:46 »
Deleted
« Last Edit: 22 / April / 2008, 17:28:15 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

*

Offline LjL

  • ****
  • 266
  • A720IS
Re: Crop image - function
« Reply #2 on: 02 / July / 2008, 08:45:57 »
Well, I don't know what was replied, but I'd like this feature too.

Especially so if it could do lossless JPEG cropping! (yes, that's possible, although you can't crop to completely arbitrary pixels)

Re: Crop image - function
« Reply #3 on: 02 / July / 2008, 15:58:52 »
Hi,
One thing that is very possible is to save the viewport image.  I have implemented viewport save and load routines in my personal build.  This works pretty well as long as you view the image on-camera.  To view off-camera you need a routine that can read viewport image data and convert to jpeg.  I wrote one as a plugin for ImageJ but it doesn't achieve the highest quality.  Canon's conversion from their strange viewport format (UYV YYY) to the camera screen produces pretty good results, but I don't know exactly how to duplicate it for a RGB image.  For instance on my A720 The viewport is 360 x 3 (bytes) by 240 height.  The 360x3 bytes hold 180 sets of UV color info and 720 sets of Y intensity information.  To complicate matters the aspect ratio of A720 images is 1.333.  That aspect ratio needs a 320x240 display.  Very strange.

Jon
« Last Edit: 02 / July / 2008, 16:01:10 by hiker_jon »


*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Crop image - function
« Reply #4 on: 02 / July / 2008, 16:02:36 »
i think barney was referring to the raw development feature. when you develop a raw file and have digital zoom enabled, the resulting jpg will be cropped. while this is a good solution for subjects in center of the picture, it is useless for subjects that are in the corner. maybe the digital zoom can be set to a certain position on the raw file.

*

Offline LjL

  • ****
  • 266
  • A720IS
Re: Crop image - function
« Reply #5 on: 03 / July / 2008, 09:41:57 »
Uhm, but even then, is that an appealing solution?

With digital zoom, the resulting image will be rescaled and the final size will be the same (no space savings, aside from the fact that JPEG might then compress a bit more efficiently since there's somewhat less information).
AND the process involves interpolation by the camera - yuck! I'd rather do my own interpolation, if any, in my computer, with some control over the algorithm used, etc...

To me, JPEG cropping (the losseless kind!) would be more interesting.
RAW cropping would be interesting too, but right now you can't even view a RAW without developing it, so wouldn't that be a bit too much guesswork, even if we could control the digital zoom position...?

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Crop image - function
« Reply #6 on: 03 / July / 2008, 10:00:27 »
yes you are right. maybe one day we can view the raw directly :)

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Crop image - function
« Reply #7 on: 03 / July / 2008, 12:54:22 »
To me, JPEG cropping (the losseless kind!) would be more interesting.

Well, there's jpegtran (part of libjpeg distribution I think), maybe it could be ported and a play mode GUI added...but I think only if the RAW buffer can be used in play mode as RAM.


*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Crop image - function
« Reply #8 on: 03 / January / 2009, 10:53:58 »
This request was revived by a new one at http://chdk.setepontos.com/index.php/topic,2795.msg26233.html#msg26233, I'm replying here because there are a couple of quotes I'd like to comment on:

With digital zoom, the resulting image will be rescaled and the final size will be the same (no space savings, aside from the fact that JPEG might then compress a bit more efficiently since there's somewhat less information).

It is only scaled if output JPEG resolution is different from cropped one. Thus if the user also selects equivalently lower jpeg resolution, scaling does not happen. This is true with the digital tele feature, which (for this cropping purpose) is more useful than the usual digital zoom, because the digital tele feature can also be activated when not zoomed in.

i think barney was referring to the raw development feature. when you develop a raw file and have digital zoom enabled, the resulting jpg will be cropped. while this is a good solution for subjects in center of the picture, it is useless for subjects that are in the corner. maybe the digital zoom can be set to a certain position on the raw file.

Maybe this center restriction could be lifted by moving the desired area in the RAW buffer to the center before JPEG is encoded? It's slow, but then again jpegtran in-camera could be even slower. Of course this would only be useful for RAWs, unless the decoded JPEG goes to the RAW buffer (and then cropping wouldn't be lossless, of course).

 

Related Topics