Problem with col2im () function

4 visualizaciones (últimos 30 días)
Dimitris M
Dimitris M el 13 de Sept. de 2013
Hello
I have a problem regarding the col2im function !
I have used the the im2col () with the property 'sliding' and a 5x5 kernel and so I have a 25 x 1000 matrix now !
I need to transform it back to an image but as I read the col2im() does not allows input to be a matrix (strangely) ! Can someone explain me why I have the following error !
"To RESHAPE the number of elements must not change."
My input matrix (im2col) is exactly the same size as the output (col2im). I read about the advice not to use this function but know have implemented it in a large workflow and I would rather not change it !
I just need to reconstruct my image.
Thanks in advance
  1 comentario
Dimitris M
Dimitris M el 15 de Sept. de 2013
Hello again
Can someone from Mathworks advice me on the subject ! This function seems to crash for no reason ! Even the documentation is not very helpful in this case !

Iniciar sesión para comentar.

Respuestas (1)

Image Analyst
Image Analyst el 15 de Sept. de 2013
This function is rarely used - probably because it's so confusing and rarely needed even if someone did understand it. In my mind, they should be deprecated. If you're using a sliding linear filter, why not just use the much simpler imfilter() or conv2()?
  4 comentarios
Dimitris M
Dimitris M el 15 de Sept. de 2013
After some research in the internet I found this - with a small modification I was able to finally run my code !
Image Analyst
Image Analyst el 15 de Sept. de 2013
I still say it's an unnecessary and obsolete function. If you want to do non-linear filter, as you have said, then the function to use is nlfilter().

Iniciar sesión para comentar.

Categorías

Más información sobre Image Segmentation and Analysis 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