Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Can't get the correct degree within two images
Replies: 16   Last Post: Apr 16, 2009 5:56 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
khoo

Posts: 63
Registered: 8/9/08
Re: Can't get the correct degree within two images
Posted: Apr 16, 2009 5:56 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Dave Robinson" <dave.robinson@somewhere.biz> wrote in message <gs6r6g$g5q$1@fred.mathworks.com>...
> "khoo" <jim_khoo@hotmail.com> wrote in message <gs2eif$5o1$1@fred.mathworks.com>...
> > Bro Dave, one more question wanna ask you, if using only 2D images, can use the code also ?? cause i try it and get the wrong angle..actually the png image is 2D in my pc one..may be u take down from internet and become 3D image ady..so wanna ask you if use 2D image, still can use the program?
>
> Sorry for the delay answering you, but I have been doing holiday things, and not been near my computer.
>
> I am at a loss to understand why I can use my code and get the correct results, and if you are using my code, using similar images, you get something different. The only suggestion I have here, is if you copied my code into your code, you had some finger trouble somewhere and copied something over incorrectly. Sounds of guessing wildly, when putting in the new code for calculating the x & y gradients, did you notice the ' symbol difference between the x and y gradients. This is the transpose operator and is crucial, but small enough to miss.
>
> I guess by 2D images, you are referring to monochrome (grey scale) images as against 3D colour images. The answer is yes there is no difference in the basic operation of the code - but of course you need to bypass the code containing the rgb2gray() functions. Maybe you could automate that with something that looked like: -
>
> [rows.columns,planes] = size(myImage);
> if(planes ==3)
> % Colour Image
> myImage_Grey = rgb2gray(myImage);
> else
> %Grey scale Image
> myImage_Grey = myImage;
> end
>
> If I understand you regarding your 20 images. I don't see any problem. The way I would tackle it is to turn the angle processing code into a function.
>
> function Corrected image = DoAngleImage(Reference_Image,Twisted_Image)
>
> and put this into a loop
>
> for i=1:20
> % Get image pair
> ... ... ...
> Corrected_image_i = DoAngleImage(Reference_Image_i,Twisted_Image_i);
> end;
>
> If you search this collaboratory, there are lots of threads on how to extract and save images within a loop.
>
> Hope that helps
>
> Regards
>
> Dave Robinson


thx a lot bro dave, i will try it..if still can't i will come back here and ask you again..really thx alot



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.