You are not logged in.

#1 2019-05-26 16:14:11

corneelvm
Member
Registered: 2019-05-26
Posts: 5

Sorting images based on content

Hello,

I have a bunch of photo's and would like to reduce the amount by removing the blurry ones (movement or not in focus) that are not that useful...

Most of the programs that I found worked with Exif data or sort by file size, those kinds of things... and manually selecting and checking for sharpness is too much work.

Does anyone have any ideas on how to deal with that?

thank you.

Last edited by corneelvm (2019-05-26 16:15:28)

Offline

#2 2019-05-27 06:28:33

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,689

Re: Sorting images based on content

I am thinking of your question from a coding point of view. I think such a thing as sorting by sharpness is difficult to implement because it deals with subjectivity. One image can be sharp to me but blurry to others and computers can't compute subjective things. It can only compute concrete data - file sizes, attributes, etc. You can probably add metadata to each image (grade it's sharpness by yourself) and then sort it by that metadata. If it is the same image of different versions of varying sharpness, then it is possible for to teach' the computer to 'learn' which one is the sharpest and sort them out because the computer learns from the same image. But with a big push in AI we might just see this sort of application happening soon.

Offline

#3 2019-05-27 06:45:28

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,500

Offline

#4 2019-05-27 09:30:57

corneelvm
Member
Registered: 2019-05-26
Posts: 5

Re: Sorting images based on content

thank you...
I will need to start getting my head around the command line or coding workflow as there seems to be no ready to use GUI for this problem, or become a better photographer wink big_smile

I have read into the ImageMagick stuff but that also seems a bit overwhelming at the moment.

Offline

#5 2019-05-27 10:03:26

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,962
Website

Re: Sorting images based on content

My 2 cents (not exactly what you want but might be useful)

https://github.com/rivo/duplo
https://github.com/photoprism/photoprism

Last edited by ugjka (2019-05-27 10:04:09)

Offline

#6 2019-05-27 12:01:00

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,530
Website

Re: Sorting images based on content

d_fajardo, there is nothing subjective about it.  In principle, it is a relatively straight-forward computational problem.  In practice, it is complex to compute, so I'd be skeptical on whether there'd be any practical-to-use tools that do it well on current consumer-grade computers - but this certainly doesn't make it subjective, just perhaps hard to compute.

I'm pleasantly surprised that imagemagick may have such options, with some emphasis on 'pleasant' and some de-emphasis on 'surprise'.  I'd be curious to see how well it does on a range or actual photos.

Last edited by Trilby (2019-05-27 12:01:34)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2019-05-27 13:49:19

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,500

Re: Sorting images based on content

"Focus" is indeed "subjective", well "kinda" ;-)

Sharpness is a matter of local contrast, but many photos will have /some/ focal point w/ high local contrast - just not where you wanted it to be for this motiv.
Also mass-handling images can be problematic, because the focal length of the lens has major impact on the size of the area in focus (mild violation of image size limits)
1.gif

So the tricky part is to determine where and how much you want the area w/ high local contrast to be.
That said, a pre-filter to search for your vacation images to put aside those which have little local contrast at all (shaky hand) should do fine, esp. if you're shooting w/ a fixed lens (ie. your phone cam)

@d_fajardo, if an image is blurry to you and sharp to others that means you need glasses :-P

Offline

#8 2019-05-27 14:12:15

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,530
Website

Re: Sorting images based on content

Agreed, but that doesn't make it subjective - just in need of a clear operational definition in order to quantify.

One could quantify the proportion of the image "in focus" (at some relevant threshold).  Or one could quantify how well a central region of the photo is focused (assuming the relevant focal objects are likely in the middle).  Or one could run edge-detection and object recognition processes to find a large foreground object that should be a likely focal point and quantify the focus of that object.

None of this is easy, and some of it potentially hard enough to not even be worth considering attempting with a substantial batch of real photos on a home computer.  But none of this makes it subjective.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#9 2019-06-08 13:15:35

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,689

Re: Sorting images based on content

@d_fajardo, if an image is blurry to you and sharp to others that means you need glasses :-P

You can tell that to my daughter who's so critical of my photos even if I always use an adjustable viewfinder smile
I must say there are accidental blurry pictures of mine that actually look better than intended.

Offline

#10 2019-06-08 13:51:53

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,530
Website

Re: Sorting images based on content

d_fajardo wrote:

I must say there are accidental blurry pictures of mine that actually look better than intended.

That may be true, but it is not relevant.  Which photo looks "better" is certainly subjective.  Better/worse are not synonyms for sharp/blurry (despite a likely overlap with extremely blurry frequently being rated as worse - abstract aesthetics notwithstanding).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB