Question

I am trying to detect if an image is blurry, in ColdFusion, but I am kinda' stuck. I read Is there a way to detect if an image is blurry? , but these coding examples are unusable in ColdFusion. If required, I can use ImageMagick.

In total, I need to process about 1 million images a month which are uploaded by users. Speed is very important.

No correct solution

OTHER TIPS

There are about 2.5 million seconds in a month, so you've got 2.5 seconds to play with per image, assuming you're processing them in a batch. If you expect an instant response for users then 2.5 seconds probably isn't close to ok.

CF is good at plenty, but applying a FFT on images of arbitrary size isn't in its sweet spot. You'll need to use another library. As @Sean_Coyne says, JavaLoader can help there.

I would also challenge whoever says you can't add extra libraries. If you're processing a million images a month, you're going to need an extra library and that's not unreasonable.

I'd also say that you need to profile the application to see what the CPU and memory requirements are like during your busiest expected period.

If you do go with OpenCV, bear in mind that although it has Java bindings, it runs native code, so you shouldn't rely on the memory stats that Java's GC logging give you (use your OS's process monitoring instead) and bear in mind that you'll need the appropriate version for your developer and production OSes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top