Using a lookup table with openCV and NumPy

前端 未结 1 1629
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-16 16:44

I\'m trying to use NumPy and CV2 by doing pixel math on an array of pixels then using a lookup table and replacing that pixel with the lookup table\'s value.

This wo

相关标签:
1条回答
  • 2021-01-16 17:21

    You can try OpenCV's Look Up Table to apply a LUT in one shot. Here is the documentation

    C++

    void LUT(InputArray src, InputArray lut, OutputArray dst, int interpolation=0 )
    

    Python

    cv2.LUT(src, lut[, dst[, interpolation]]) → dst
    
    0 讨论(0)
提交回复
热议问题