mobian, pinephone camera, and megapixels - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120) +--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121) +---- Forum: Mobian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139) +---- Thread: mobian, pinephone camera, and megapixels (/showthread.php?tid=13380) |
RE: mobian, pinephone camera, and megapixels - NormandC - 04-28-2021 Hello Cal, (04-28-2021, 04:16 PM)calinb Wrote: I guess it still hasn't rolled out in a Mobian update / upgrade yet? Unfortunately not, the megapixel package in Mobian is still 0.15, and the fix is in the 0.16 release. Because of the bullseye upcoming release, matters are in some limbo. (04-28-2021, 04:16 PM)calinb Wrote: I thought I described my fix in my last posts in this thread (after mucking my way through the debug effort). You did, and I applied your fix a couple weeks ago. Thanks for that! - Norm RE: mobian, pinephone camera, and megapixels - Zebulon Walton - 04-28-2021 (04-28-2021, 04:16 PM)calinb Wrote: Zebulon, Must have missed that, I'll make the change and see how it works, thanks! RE: mobian, pinephone camera, and megapixels - calinb - 04-28-2021 (04-28-2021, 04:29 PM)NormandC Wrote: Hello Cal, Thanks for the update, Norm! Hopefully, Zebulon will be able to similarly patch his postprocess.sh file and get his .jpg files back too. -Cal (04-28-2021, 04:40 PM)Zebulon Walton Wrote: Must have missed that, I'll make the change and see how it works, thanks! I missed your post while I was replying to Norm. Please let us know how it goes. -Cal RE: mobian, pinephone camera, and megapixels - Zebulon Walton - 04-28-2021 (04-28-2021, 04:44 PM)calinb Wrote: Thanks for the update, Norm! Success, the jpg is now being produced. (Takes a little while for processing, nature of the beast.) The dng version of the photo is also being saved. Is there a shell script mod to have those automagically deleted? RE: mobian, pinephone camera, and megapixels - calinb - 04-28-2021 (04-28-2021, 05:21 PM)Zebulon Walto Wrote: Success, the jpg is now being produced. (Takes a little while for processing, nature of the beast.) The dng version of the photo is also being saved. Is there a shell script mod to have those automagically deleted? I can't look at the script right now, but IIRC, I there might be a problem with the simple postprocess.sh script in targeting just the latest .dng files for deletion. However, I think I quickly came to the conclusion that it would be possible and simple to just "rm ~/Pictures/*.dng" to nuke all of them after each invocation of the script--or maybe mv them to Trash. RE: mobian, pinephone camera, and megapixels - Zebulon Walton - 04-28-2021 (04-28-2021, 05:50 PM)calinb Wrote: I can't look at the script right now, but IIRC, I there might be a problem with the simple postprocess.sh script in targeting just the latest .dng files for deletion. However, I think I quickly came to the conclusion that it would be possible and simple to just "rm ~/Pictures/*.dng" to nuke all of them after each invocation of the script--or maybe mv them to Trash. Of course, simple solution! RE: mobian, pinephone camera, and megapixels - MtnSk8 - 04-29-2021 I added: Code: rm "$TARGET_NAME.dng" ---------------------------------------- Thanks for all the debugging this was a super helpful thread! Cheers! RE: mobian, pinephone camera, and megapixels - dukla2000 - 04-29-2021 (04-28-2021, 04:29 PM)NormandC Wrote: ... +1 thanks to @calinb As identified the "silver bullet" in megapixels is the post-processing script.
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:
Code: $ cat .config/megapixels/postprocess.sh RE: mobian, pinephone camera, and megapixels - Zebulon Walton - 04-29-2021 Quote:@dukla2000: Neat, I copied the modified script to ~/.config/megapixels to play around with. Full processing of a photo with everything enabled takes about 45-50 seconds. By eliminating the exiftool step (I don't care about metadata) that gets cut down to about 30 seconds. 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? Another thing I'm noticing is the jpegs being produced now are much larger than when I last used the camera months ago, my photos from back then are under a megabyte, new ones are 3-4 megabytes. Unless I reduced the size of the old photos and forgot (which is possible) something changed. RE: mobian, pinephone camera, and megapixels - dukla2000 - 04-29-2021 (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. |