help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: need example for fisheye effect on images


From: Kevin H. Hobbs
Subject: Re: need example for fisheye effect on images
Date: Fri, 21 Sep 2012 12:14:22 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0

On 09/21/2012 11:21 AM, paiuia wrote:
> 
> With
> I = imread('c:\users\ax\desktop\_math\sfera.jpg');
> S = conv2 (I, ones (5, 5) / 25, "same");
> [Dx, Dy] = gradient (S);
> 
> I get error:
> " error: invalid conversion of uint8 matrix to Matrix "
> 

Convert your image to double first.

I = double(I);

Then do your processing.

Then convert it back (or not) to unsigned int to write it.

% rescale and write
m = max(max( I ));
imwrite( uint8( I / m * 255 ), "out.png" );

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]