matlab-将图像像素值连接到一行或一列数据中 [英] matlab - concatenate image pixel value into one row or one column of data

查看:356
本文介绍了matlab-将图像像素值连接到一行或一列数据中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个图像识别项目,并希望使用像素值作为媒介,通过matlab nprtool区分2个不同的图像.要准备训练和测试数据集,数据必须为列或行形式.那么如何将图像的像素值(例如100x100)连接到1列或1行数据中?最合适的方法是什么?

解决方案

如果您的矩阵称为image,请使用:运算符

  image(:)

i am doing an image recognition project and would like to use the pixel values as the medium to differentiate 2 different images via matlab nprtool. To prepare the training and testing data set, the data has to be in either a column or a row form. So how can I concatenate pixel values of an image (for example 100x100) into 1 column or 1 row of data? What is the most appropriate way to do it?

解决方案

if your matrix is called image, use the : operator

  image(:)

这篇关于matlab-将图像像素值连接到一行或一列数据中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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