weixin_39575007
weixin_39575007
2020-12-08 22:20

Update calculating brightness & saturation indices

As per the research paper followed for building this algorithm (see: http://hplabs.hp.com/techreports/2005/HPL-2005-14.pdf), saturation index and brightness index are defined as: Saturation Index: To implement this, we compute the color saturation and subtracted the average color saturation of the blurry areas from that of the sharp areas. Brightness Index: To implement this, we compute the average brightness difference between the sharp and blurry areas. Proposed relevant changes required to calculate brightness and saturation index in this regard.

该提问来源于开源项目:tokenrove/blur-detection

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_39630735 weixin_39630735 5月前

    Thanks!

    Although the phrasing in the paper for the brightness index is a bit ambiguous to me (the difference of the averages isn't the average of the differences, but computing the differences and then averaging them would be way more expensive), I think what you've proposed is obviously more correct.

    It would be nice if we had some unambiguous test cases where it was clear what these values should be, to catch any further errors like this.

    点赞 评论 复制链接分享
  • weixin_39630735 weixin_39630735 5月前

    I've slightly altered the formatting and commit message and merged this as commit f88dfcf8701661686a6dad9c3b236e392070e192. Thanks a lot! Consider helping me to come up with some good test cases so more bugs like this can be detected.

    (Incidentally, I noticed there, unrelated to your changes, that it should be possible to construct an image that causes a divide-by-zero. I'll see if I can get the time to add a test and a fix for that.)

    点赞 评论 复制链接分享
  • weixin_39575007 weixin_39575007 5月前

    Thanks . Where can we get connected for discussion regarding test cases and this repository in general?

    点赞 评论 复制链接分享
  • weixin_39630735 weixin_39630735 5月前

    Feel free to open GitHub issues for discussion. One is also always welcome to email me at julian.net. Although there's been this bit of activity lately, I still don't consider this an active project so I wouldn't go out of my way to create a mailing list or anything.

    点赞 评论 复制链接分享

相关推荐