Borrar filtros
Borrar filtros

Help for image processing and management of matrices

2 visualizaciones (últimos 30 días)
luisa bertoli
luisa bertoli el 8 de Mayo de 2018
Respondida: Ameer Hamza el 8 de Mayo de 2018
Hi, I'm doing an analysis of a video with Matlab, for the first time. I've obtained a series of matrices (one for each frame)[cdata] that I've stored in a 1205x1 array. what i would like to know is how to deal with an array of matrices.which kind of for loop should i do to do operations and analysis considering all the matrixes? Any help and code will be really useful. thank you

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 8 de Mayo de 2018
You probably have a cell array of 1205x1. Use cellfun() to apply same processing to all the images. For example, if you want to convert all your images to grayscale then you can do that in one line using cellfun()
grayImagesArray = cellfun(@rgb2gray, allImagesArray, 'UniformOutput', false)
Similarly, you can define your own function (say processImage()), save it to MATLAB path and apply it to all images using
processedImagesArray = cellfun(@processImage, allImagesArray, 'UniformOutput', false)

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by