English 中文(简体)
Octave Errors in attempting to study Image Compression
原标题:

Let me start by saying I LOVE YOU. Thank you.

Next order of business:

octave-3.2.3:8> xin = imread( 3Phone.png );
octave-3.2.3:9> colormap(gray(256));
octave-3.2.3:10> image(xin);
error: invalid value for array property "cdata"
error: set: expecting argument 2 to be a property name
error: set: expecting argument 4 to be a property name
error: set: expecting argument 6 to be a property name
error: called from:
error:   /Applications/Octave.app/Contents/Resources/share/octave/3.2.3/m/image/__img__.m at line 57, column 7
error:   /Applications/Octave.app/Contents/Resources/share/octave/3.2.3/m/image/image.m at line 75, column 5
error: A(I): Index exceeds matrix dimension.
error: called from:
error:   /Applications/Octave.app/Contents/Resources/share/octave/3.2.3/m/plot/__go_draw_axes__.m at line 383, column 22
error:   /Applications/Octave.app/Contents/Resources/share/octave/3.2.3/m/plot/__go_draw_figure__.m at line 92, column 3
error:   /Applications/Octave.app/Contents/Resources/share/octave/3.2.3/m/plot/gnuplot_drawnow.m at line 91, column 5
octave-3.2.3:10> 

I am using Octave 3.2.3 on Mac OS X (Snow Leopard). This is a very basic attempt to display an image that has been read and stored memory. Any help on fixing this problem would be much appreciated. Thanks!

最佳回答

My guess, When you read a png file - Make sure it s a grayscale file. Otherwise there are 3 Matrices (RGB). Therfore you can t use Gray Colormap.

If 2Phone.png is a color image, Try (At least this is what I would do in Matlab):

xin = imread( 3Phone.png );
image(xin(:, :, 1);
colormap(gray(256));

This would display only the R Matrix.

Or better, use RGB2Gray (Of course, use the equivalent of Octave).

问题回答

暂无回答




相关问题
Resources for Image Recognition

I am looking for a recommendation for an introduction to image processing algorithms (face and shape recognition, etc.) and wondered if anyone had an good recommendations, either for books, ...

Good reference book for digital image processing? [closed]

I am learning digital image processing on my own and would like recomendations on good reference books. If you know of books to definately stay away from that would be useful as well. Thanks

Python Tesseract can t recognize this font

I have this image: I want to read it to a string using python, which I didn t think would be that hard. I came upon tesseract, and then a wrapper for python scripts using tesseract. So I started ...

What s the quickest way to parallelize code?

I have an image processing routine that I believe could be made very parallel very quickly. Each pixel needs to have roughly 2k operations done on it in a way that doesn t depend on the operations ...

Computing object statistics from the second central moments

I m currently working on writing a version of the MATLAB RegionProps function for GNU Octave. I have most of it implemented, but I m still struggling with the implementation of a few parts. I had ...

Viola-Jones face detection claims 180k features

I ve been implementing an adaptation of Viola-Jones face detection algorithm. The technique relies upon placing a subframe of 24x24 pixels within an image, and subsequently placing rectangular ...

热门标签