mobian, pinephone camera, and megapixels
#31
(04-29-2021, 04:08 AM)dukla2000 Wrote: <snip>

The other nugget for postprocess.sh is if you put a version in ~/.config/megapixels/ then that is used in preference to the default in /usr/share/megapixels/ . Which will survive any upgrades and can do stuff the way you prefer. So my version has 3 mods:
  1. the @calinb / v0.16 patch
  2. I have commented out the initial copy of the .dng file to /Pictures as I dont want to preserve any raw images
  3. I have added an exiftool line (and suggested it to Martijn) to set the DateTimeOriginal tag. (Because the package I use for my media library, fotoxx, can sort on that tag!)


Thanks for the new script options, dukla2000!



(04-29-2021, 07:09 AM)Zebulon Walton Wrote: <snip>

Tiff format as far as I know is not widely used for photos and seems kind of a waste, would it be feasible to convert directly from dng to jpg to save processing time?

<snip>

Just an FYI: According to https://en.wikipedia.org/wiki/Digital_Negative

"DNG is based on the TIFF/EP standard format, and mandates significant use of metadata."

Raw lossless formats are widely used for archives and image processing and, after installing Rawtherapee on my MX Linux (Debian-based) laptop, I can read .dng.  The Rawtherapee installation provided a compatible plugin so GIMP can read .dng too.

-Cal
  Reply
#32
(04-29-2021, 07:09 AM)Zebulon Walton Wrote: ... Now I'm admittedly not familiar with the image processing tools, but if I understand correctly the script uses tiff format as an intermediate step to get to jpg (dng-->tiff-->jpg). Tiff format as far as I know is not widely used for photos and seems kind of a waste, would it be feasible to convert directly from dng to jpg to save processing time?
...

Yes but ...!
Technically imagemagick could do a direct conversion .dng -> .jpg. The "but" is that dcraw is doing more than just a format conversion, it is using some magic options (chosen by Martijn) to try make the picture look better as per the comments in the postprocess script. dcraw cannot output .jpg though. But again the megapixels choice to use imagemagick to do the conversion to .jpg also allows the chance to get imagemagick to try sharpen things.

Or you could cut out most of the (megapixels) postprocessing and use a package like RawTherapee to process your images.

The fundamental limitation though is the inexpensive sensors chosen by Pine64 are pretty much point and click cheapos and so no amount of postprocessing can turn me into David Bailey! Then again, even with slightly expensive kit I struggle to get stuff in focus so having the PinePhone for quick snaps is fine by me.
  • ROCKPro64 v2.1 2GB, 16Gb eMMC for rootfs, SX8200Pro 512GB NVMe for /home, HDMI video & sound, Bluetooth keyboard & mouse. Started Bionic minimal - now "groovy", Openbox desktop for general purpose daily PC.
  • PinePhone BraveHeart now v1.2b 3/32Gb daily driver, dual boot via p-boot with Mobian/f2fs/Phosh on eMMC, Arch/f2fs/Phosh on SDcard
  • PinePhone v1.2a 2G/16Gb that needs USB board replaced
  Reply
#33
dukla2000 Wrote:Yes but ...!
Technically imagemagick could do a direct conversion .dng -> .jpg. The "but" is that dcraw is doing more than just a format conversion, it is using some magic options (chosen by Martijn) to try make the picture look better as per the comments in the postprocess script. dcraw cannot output .jpg though. But again the megapixels choice to use imagemagick to do the conversion to .jpg also allows the chance to get imagemagick to try sharpen things.

Or you could cut out most of the (megapixels) postprocessing and use a package like RawTherapee to process your images.

The fundamental limitation though is the inexpensive sensors chosen by Pine64 are pretty much point and click cheapos and so no amount of postprocessing can turn me into David Bailey! Then again, even with slightly expensive kit I struggle to get stuff in focus so having the PinePhone for quick snaps is fine by me.

I saw that there was other processing going on to fix up the images. Still, for me the Pinephone camera would only be for occasional quick snaps, and quick processing would be more important to me than improving the image in post. (If I want quality photos I use a real camera. Smile)

Now that I have the local script in place I'll play around with it. Might even be best to just let it save the dng images and run my own batch conversion afterwards. The phone is running on the eMMC but my data directories are symlinked to a 256GB SD card so the large size of the images isn't that much of a problem.
  Reply
#34
(04-29-2021, 01:02 PM)dukla2000 Wrote: ...
Technically imagemagick could do a direct conversion .dng -> .jpg.
...

Actually just tried to play a bit more myself and seems this is complete codswallop! imagemagick delegates the raw processing to ufraw, which in turn subcontracts to dcraw! So using dcraw in the first place is very sensible by megapixels/Martijn Smile 

Yeah batch processing later would certainly keep the megapixels frontend looking more ready for action!
  • ROCKPro64 v2.1 2GB, 16Gb eMMC for rootfs, SX8200Pro 512GB NVMe for /home, HDMI video & sound, Bluetooth keyboard & mouse. Started Bionic minimal - now "groovy", Openbox desktop for general purpose daily PC.
  • PinePhone BraveHeart now v1.2b 3/32Gb daily driver, dual boot via p-boot with Mobian/f2fs/Phosh on eMMC, Arch/f2fs/Phosh on SDcard
  • PinePhone v1.2a 2G/16Gb that needs USB board replaced
  Reply
#35
FYI, megapixels was finally upgraded to 0.16 (which includes the fix) in Mobian unstable on Thursday.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pinephone in Canada using Shaw mobile provider RRman 0 48 06-19-2021, 06:35 PM
Last Post: RRman
  Reboot Modem on Pinephone in Mobian eggmatters 5 510 06-17-2021, 02:08 PM
Last Post: eggmatters
  Axolotl on PinePhone / Mobian arno_nuehm 93 22,147 06-11-2021, 07:16 AM
Last Post: ergo owl
  Mobian not updating via Software app FOSSagent0 2 234 06-07-2021, 09:22 PM
Last Post: Zebulon Walton
  mobile data on mobian not working synaption 1 174 06-02-2021, 03:16 PM
Last Post: Aberts10
  How do you copy and paste into mobian terminal? Do you ssh instead? temp0rary 6 309 06-01-2021, 12:16 PM
Last Post: temp0rary
  Turn by Turn alternative GPS app in Mobian livanti21 27 12,405 05-30-2021, 03:17 AM
Last Post: john_doe
  Pinephone ”reboot” or logging out by itself Wahtone 0 143 05-28-2021, 09:32 AM
Last Post: Wahtone
  Can't update OS Mobian Phosh Gon 5 495 05-23-2021, 10:52 PM
Last Post: pajux
  Mobian: 2 week as main phone steves 10 1,526 05-18-2021, 11:55 AM
Last Post: vortex

Forum Jump:


Users browsing this thread: 1 Guest(s)