image - 在 MATLAB 中翻转和旋转彩色图像

标签 image matlab colors

如何在 MATLAB 中翻转彩色图像 (RGB)? fliplr 似乎无法在不丢失颜色内容的情况下工作,因为它只处理 2D。

同样,imrotate 可能不会旋转彩色图像。

最佳答案

函数flipdim将适用于 N 维矩阵,而函数 flipudfliplr仅适用于二维矩阵:

img = imread('peppers.png');     %# Load a sample image
imgMirror = flipdim(img,2);      %# Flips the columns, making a mirror image
imgUpsideDown = flipdim(img,1);  %# Flips the rows, making an upside-down image

注意:在较新版本的 MATLAB(R2013b 和更新版本)中,函数 flip现在推荐而不是 flipdim .

关于image - 在 MATLAB 中翻转和旋转彩色图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4010113/

相关文章:

php - 显示来自数据库的图像

matlab - 低通图像滤镜问题

python - Tkinter askcolor 返回错误的 RGB 值?

colors - 如何更改 JFreeChart 甘特图中特定子任务的颜色?

image - 如何在Grails中显示图像?

python - 将灰度图像转换回矢量

css - 单击后 Chrome 中的黄色图像边框

python - 将 varargin 和 nargin 从 Matlab 转换为 Python

c++ - 在 matlab mex 文件中动态链接时枚举的 typeid 发生变化

git - Git Grep颜色选项说明和/或比较