是否可以在MATLAB中实现以下内容? [英] Is it possible to implement the following in MATLAB?

查看:121
本文介绍了是否可以在MATLAB中实现以下内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由I(i,j)= | 4-i-j |给出5x5的图像当我,j = 0,1,2,3,4。

Given an image of 5x5 by I(i, j) = |4-i-j| when i,j = 0,1,2,3,4.

以及以下的Prewitt运营商:

and the following Prewitt operator :

               { {-1, 0, 1},
                 {-1, 0, 1},
                 {-1, 0, 1} }

               { {-1, -1, -1},
                 {0, 0, 0},
                 {1, 1, 1} }

如何计算梯度? [幅度和方向](使用Prewitt算子)

How do I calculate the gradient ? [magnitude and direction] (with Prewitt operator)

推荐答案

有多种方法可以做到这一点:

There are multiple ways to do this:


  • 编写自己的卷积函数

  • 使用 imgradient

  • 使用 imfilter

  • 使用 conv2

  • Write your own convolution function
  • Use imgradient
  • Use imfilter
  • Use conv2

这篇关于是否可以在MATLAB中实现以下内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆