How To Measure Contrast in OpenCV + Visual C++

后端 未结 1 1200
慢半拍i
慢半拍i 2021-02-15 01:26

The question was previously \"How to select image of best contrast in OpenCV\" but as per @Rook\'s suggestion, I\'m changing it.

I am going to use OpenCV + Visual Studio

相关标签:
1条回答
  • 2021-02-15 02:04

    Entropy of image is used as a measure of contrast. See this code.

    Entropy is a scalar value, statistical measure of randomness that can be used to characterize the texture of the input image. Entropy is defined as

    -sum(p.*log2(p))
    

    where p contains the histogram counts.

    — Matlab documentation

    0 讨论(0)
提交回复
热议问题