所有函数的命名空间为 cv::intensity_transform。
支持的算法
- 自动缩放
- 对数变换
- 幂律 (伽马) 变换
- 对比度拉伸
- BIMEF, A Bio-Inspired Multi-Exposure Fusion Framework for Low-light Image Enhancement [315] [316]
参考文献来自以下书籍和网站
|
| void | cv::intensity_transform::autoscaling (const Mat input, Mat &output) |
| | 给定输入的 BGR 或灰度图像,在 [0, 255] 域上应用自动缩放以提高输入图像的对比度,并返回结果图像。
|
| |
| void | cv::intensity_transform::BIMEF (InputArray input, OutputArray output, float k, float mu, float a, float b) |
| | 给定输入的彩色图像,使用 BIMEF 方法增强低光图像 ([315] [316])。
|
| |
| void | cv::intensity_transform::BIMEF (InputArray input, OutputArray output, float mu=0.5f, float a=-0.3293f, float b=1.1258f) |
| | 给定输入的彩色图像,使用 BIMEF 方法增强低光图像 ([315] [316])。
|
| |
| void | cv::intensity_transform::contrastStretching (const Mat input, Mat &output, const int r1, const int s1, const int r2, const int s2) |
| | 给定输入的 BGR 或灰度图像,在 [0, 255] 域上应用线性对比度拉伸,并返回结果图像。
|
| |
| void | cv::intensity_transform::gammaCorrection (const Mat input, Mat &output, const float gamma) |
| | 给定输入的 BGR 或灰度图像和常数 gamma,在 [0, 255] 域上对图像应用幂律变换,即伽马校正,并返回结果图像。
|
| |
| void | cv::intensity_transform::logTransform (const Mat input, Mat &output) |
| | 给定输入的 BGR 或灰度图像和常数 c,在 [0, 255] 域上对图像应用对数变换,并返回结果图像。
|
| |
◆ autoscaling()
| void cv::intensity_transform::autoscaling |
( |
const Mat | input, |
|
|
Mat & | output ) |
| Python |
|---|
| cv.intensity_transform.autoscaling( | input, output | ) -> | None |
◆ BIMEF() [1/2]
| void cv::intensity_transform::BIMEF |
( |
InputArray | input, |
|
|
OutputArray | output, |
|
|
float | k, |
|
|
float | mu, |
|
|
float | a, |
|
|
float | b ) |
| Python |
|---|
| cv.intensity_transform.BIMEF( | input[, output[, mu[, a[, b]]]] | ) -> | output |
| cv.intensity_transform.BIMEF2( | input, k, mu, a, b[, output] | ) -> | output |
#include <opencv2/intensity_transform.hpp>
给定输入的彩色图像,使用 BIMEF 方法增强低光图像 ([315] [316])。
这是带有曝光比参数的重载函数。
- 参数
-
| input | 输入的彩色图像。 |
| output | 结果图像。 |
| k | 曝光比。 |
| mu | 增强比。 |
| a | 相机响应函数 (CRF) 中的 a 参数。 |
| b | 相机响应函数 (CRF) 中的 b 参数。 |
- 警告
- 这是 原始 MATLAB 算法 的 C++ 实现。与原始代码相比,此实现速度稍慢,并且不提供相同的结果。特别是,在某些条件下,亮区的图像增强质量会下降。
◆ BIMEF() [2/2]
| void cv::intensity_transform::BIMEF |
( |
InputArray | input, |
|
|
OutputArray | output, |
|
|
float | mu=0.5f, |
|
|
float | a=-0.3293f, |
|
|
float | b=1.1258f ) |
| Python |
|---|
| cv.intensity_transform.BIMEF( | input[, output[, mu[, a[, b]]]] | ) -> | output |
| cv.intensity_transform.BIMEF2( | input, k, mu, a, b[, output] | ) -> | output |
◆ contrastStretching()
| void cv::intensity_transform::contrastStretching |
( |
const Mat | input, |
|
|
Mat & | output, |
|
|
const int | r1, |
|
|
const int | s1, |
|
|
const int | r2, |
|
|
const int | s2 ) |
| Python |
|---|
| cv.intensity_transform.contrastStretching( | input, output, r1, s1, r2, s2 | ) -> | None |
#include <opencv2/intensity_transform.hpp>
给定输入的 BGR 或灰度图像,在 [0, 255] 域上应用线性对比度拉伸,并返回结果图像。
- 参数
-
| input | 输入的 BGR 或灰度图像。 |
| output | 对比度拉伸的结果图像。 |
| r1 | 变换函数中第一点 (r1, s1) 的 x 坐标。 |
| s1 | 变换函数中第一点 (r1, s1) 的 y 坐标。 |
| r2 | 变换函数中第二点 (r2, s2) 的 x 坐标。 |
| s2 | 变换函数中第二点 (r2, s2) 的 y 坐标。 |
◆ gammaCorrection()
| void cv::intensity_transform::gammaCorrection |
( |
const Mat | input, |
|
|
Mat & | output, |
|
|
const float | gamma ) |
| Python |
|---|
| cv.intensity_transform.gammaCorrection( | input, output, gamma | ) -> | None |
#include <opencv2/intensity_transform.hpp>
给定输入的 BGR 或灰度图像和常数 gamma,在 [0, 255] 域上对图像应用幂律变换,即伽马校正,并返回结果图像。
- 参数
-
| input | 输入的 BGR 或灰度图像。 |
| output | 伽马校正的结果图像。 |
| gamma | c*r^gamma 中 r 是像素值的常数。 |
◆ logTransform()
| void cv::intensity_transform::logTransform |
( |
const Mat | input, |
|
|
Mat & | output ) |
| Python |
|---|
| cv.intensity_transform.logTransform( | input, output | ) -> | None |