ApplicationInImageProcessing
ApplicationInImageProcessing copied to clipboard
application in image processing or searching

## knn 算法 ### description ### reference [K NEAREST NEIGHBOR](https://coolshell.cn/articles/8052.html)
### reference [python-mosaics](http://www.tecoed.co.uk/python-mosaics.html) [A simple photo mosaic algorithm with OpenCv](https://github.com/DavideA/photomosaic)
### Seam Carving 算法 > 一种内容感知的图像缩放算法 ### 参考: [Seam Carving算法](https://blog.csdn.net/hjimce/article/details/44916869) [Seam Carving 缩放策略](https://blog.csdn.net/ilovejohnny/article/details/51915048) [cost matrix](http://desktop.arcgis.com/zh-cn/arcmap/latest/extensions/network-analyst/od-cost-matrix.htm) [接缝算法参考](http://cs.brown.edu/courses/cs129/results/proj3/taox/)
[test](https://www.pyimagesearch.com/2017/06/19/image-difference-with-opencv-and-python/)
```python # coding=utf-8 import cv2 import numpy as np in_image = cv2.imread('./image/image6.jpg') h, w, ch = in_image.shape forward_rotate = np.zeros((w, h, ch)) image_flip = np.fliplr(in_image) for c in range(ch): for...
# scharr滤波器 > 使用Scharr滤波器运算符计算x或y方向的图像差分 ### 函数 Scharr(src, ddepth, dx, dy, dst=None, scale=None, delta=None, borderType=None) 参数说明: - src: InputArray 类型的src,为输入图像 - dst : 输出图像大小,与输入图像通道数相同 - ddepth: 图像输出深度 -- 若src.depth() = CV_8U,...
## 利用OpenCV的filter2D函数作图像的卷积操作和协相关操作 图像的卷积操作是图像处理中最常用的操作之一,一般是用核算子来实现卷积操作。什么叫[核算子](http://opencv66.net/thread-26-1-1.html)? ### 理论   OpenCV用函数filter2D来实现对图像或矩阵的卷积操作。这个函数本质上做的是协相关操作,但是当核算子是对称的,则协相关操作也是卷积操作,计算公式如下:  当核算子不是对称的时候,则需要把核算子旋转180度,然后再把核算子的锚点改为(kernel.cols - anchor.x - 1, kernel.rows - anchor.y - 1),这样做的运算就是卷积运算了。 ### 函数filter2D的原型如下: ```c++ void filter2D(InputArray src, OutputArray dst, int ddepth, InputArray kernel,...