#include <opencv2/opencv.hpp> #include <iostream> using namespace cv; using namespace std; int main(int argc, char** argv) { Mat src = imread("test.jpg"); Mat logo = imread("logo.jpg"); //设定ROI区域 Mat ROI = src(Rect(, , logo
一.思路 二.代码: #coding:utf-8 import numpy as np import PIL.Image as Image import pickle as p import os class ImageTools(object): image_dir='images/' result_dir='results/' data_file_path='data.bin' def imageToArray(self,files): images=[] for i in range(le
# -*- coding: utf-8 -*- """ Created on Wed Mar 7 11:04:15 2018 @author: markli """ import numpy as np; from PIL import Image; import matplotlib.pyplot as pyplot; class ImageFilter: def __init__(self,filepath): self.path = fil