当前位置:网站首页>opencv图像增强
opencv图像增强
2022-04-22 05:43:00 【从刻意到习惯】
//掩模,图像增强的两种方法
cols = src.cols * src.channels();
rows = src.rows;
int offset = src.channels();
Mat dst1 = Mat::zeros(src.size(), src.type());
/*for (int row = 1; row < rows; row++)
{
const uchar* current = src.ptr<uchar>(row);
const uchar* previous = src.ptr<uchar>(row - 1);
const uchar* next = src.ptr<uchar>(row + 1);
uchar* output = img.ptr<uchar>(row);
for (int col = offset; col < cols; col++)
output[col] = saturate_cast<uchar>(5 * current[col] - (current[col - offset] + current[col + offset] + previous[col] + next[col]));
}*/
Mat kernel = (Mat_<char>(3, 3) << 0, -1, 0, -1, 5, -1, 0, -1, 0);
filter2D(src, dst1, src.depth(),kernel);
版权声明
本文为[从刻意到习惯]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_43491924/article/details/114836359
边栏推荐
猜你喜欢

Jeecgboot Online form Development - control Configuration

STM32 study notes 4 - HC_ Commissioning record of SR04 ultrasonic ranging module

第90篇 LeetCode剑指Offer动态规划(七)最长不包含重复字符的子字符串

第75篇 LeetCode题目练习(八) 8.字符串转整数

通用定时器

stm32单片机与LD3320语音模块交互法一

STM32学习笔记4——HC_SR04超声波测距模块的调试记录

Part 72 leetcode exercise (V) 5 Longest Palindromic Substring

Chorme debugging tool

第88篇 LeetCode剑指Offer动态规划(五)礼物的最大值
随机推荐
hp unix上编译openssl并使用
蓝桥杯嵌入式学习之双路AD采集
用MOS管构成H桥的心得
stm32 printf 重定向 虚拟示波器
AD5724 双极性ADC
STM32 learning note 2 - set GPIO register to realize running water lamp
蓝桥杯嵌入式省赛第七届:模拟液位检测告警系统”
Speed measurement based on 51 single chip microcomputer and Hall sensor
Installation of QT learning
Geojson file and ShapeFile file single conversion gadget
第88篇 LeetCode剑指Offer动态规划(五)礼物的最大值
Part 85 leetcode sword refers to offer dynamic programming (II) frog jumping steps
ocilib库连接oracle
QT中出现error: undefined reference to `Widget::SetTime()‘
汇编 dos中断功能
WGS84 coordinate conversion, map picking, WGS84 coordinate tool recommended
Installing GCC on AIX and using
标准输入、标准输出、标准错误 重定向及管道
m1芯片上编译arm64的openssl
Developing Postgres custom function with C language