using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using OpenCVForUnity;
using UnityEngine.UI;
public class test : MonoBehaviour {
public Texture2D src2d;
public RawImage srcimg;
void Start () {
}
void Update () {
if (Input.GetKeyDown(KeyCode.K))
{
Mat src = new Mat(src2d.height,src2d.width,CvType.CV_8UC3);
Utils.texture2DToMat(src2d, src);
Mat dstImage=new Mat();
Imgproc.blur(src,dstImage,new Size(5,5));
Texture2D texture2D = new Texture2D(src.cols(), src.rows(),TextureFormat.RGBA32, false);
Utils.matToTexture2D(dstImage, texture2D);
srcimg.texture = texture2D;
}
}
}
unity opencv 模糊 blur
猜你喜欢
转载自blog.csdn.net/weixin_37744986/article/details/80632076
今日推荐
周排行