void LUT(InputArray src, InputArray lut, OutputArray dst)
2013-06-12 20:33
183 查看
夏天好热= =
我一直念念不忘的是
LUT = =
今天终于可以解开她的所有衣物 = =
不只是真面目哟
当然
完成这个任务的
依旧是我们最爱的
lena 桑
【20】void LUT(InputArray src, InputArray lut, OutputArray dst)
void LUT(InputArray src, InputArray lut, OutputArray dst)
http://www.opencv.org.cn/opencvdoc/2.3.2/html/modules/core/doc/operations_on_arrays.html?highlight=lut#void
LUT(InputArray src, InputArray lut, OutputArray dst)
LUT速度之快大家已经感受过了吧
LUT
本质上就是一个RAM。
它把数据事先写入RAM后,
每当输入一个信号就等于输入一个地址进行查表,
找出地址对应的内容,
然后输出。
void LUT(InputArray src, InputArray lut, OutputArray dst)
src – Source array of 8-bit elements. 【8U pr 8S】
lut – Look-up table of 256 elements. 【256】
In case of multi-channel source array, the table should either have a single channel (in this case the same table is used for all channels) or the same number of channels
as in the source array.
dst – Destination array of the same size and the same number of channels as src , and the same depth as lut
uchar table[256];
for (int i = 0; i < 256; i++) {
table[i] = 255 - i;
}
Mat lookUpTable(1, 256, CV_8U);
uchar* p = lookUpTable.data;
for( int i = 0; i < 256; ++i)
p[i] = table[i];
LUT(src, lookUpTable, dst);
大家看一下下面的数据吧 = =
弄了前64个出来
src里的 第一个元素 125
经过查找表运算后得到
dst里的 第一个元素 130
而查找表里
LookUpTable[125] = 130
说明了这样一种变换
src[i,j] = g => LUT[g] = k => dst[i,j] = k
这样的线性变换我们可以做很多事情 = =
比如‘
···
不告诉你 = 3=
相关文章推荐
- android canvas void drawBitmap(Bitmap bitmap, Rect src, Rect dst, Paint paint)
- static void cvTsDistTransform( const CvMat* _src, CvMat* _dst, int dist_type, intmask_size, float* _
- 字符串相乘:void mul(char *input1,int n1,char *input2,int n2,char *output)
- void *memcpy(void *dst,void const *src,size_t len):从src的起始位置复制len个字节到dst的内存起始位置。可以用这种方法复制任何类型的值。
- 字符转换:void Stringchange(const char* input,char* output)
- 数据流DataInput(Output)Stream 和 字节数组流 ByteArrayInput(Output) Stream
- Java之数据流DataInput(Output)Stream 和 字节数组流 ByteArrayInput(Output) Stream的嵌套
- 实现内存复制函数void * memcpy(void *dst,void *src,int count).
- 不要使用库函数,写出void *memcpy(void *dst, const void *src, size_t count),其中dst是目标地址,src是源地址。
- void OnRenderImage(RenderTexture src, RenderTexture dst) 的坑
- linux sh : user array as function's input or output parameter
- void* memcpy(void* dst, const void* src, int size)
- rbd file input output test
- 对报告描述符里主项目input和output的理解(原)
- LeetCode[167] Two Sum II - Input array is sorted
- python2.7出现IOError: [Errno 5] Input/output error
- Leetcode: 167. Two Sum II - Input array is sorted
- html标签padding--设置 btn的背景色,背景颜色方法, input的src属性
- XenServer安装:[Errno 5] Input/Output error
- 167. Two Su 4000 m II - Input array is sorted