No BSD License  

Highlights from
Callibrating an image

2.0

2.0 | 4 ratings Rate this file 5 Downloads (last 30 days) File Size: 6.85 KB File ID: #14307
image thumbnail

Callibrating an image

by Gaurav Sehgal

 

16 Mar 2007 (Updated 19 Mar 2007)

This functions enables user to callibrate the image to get the relationship between pixel distance a

| Watch this File

File Information
Description

User can callibrate an image to get the conversion factor fro transforming pixels values on the image to real world distances. The function takes greyscale image as input. After that it a prompt asks the user to enter the callibration scale in cm. The user then clicks on any point on the image and drag the mouse holding the left button down to whichever location he desires. Now this distance in pixels from starting pt to end pt selected by user corresponds to the distance in cm entered by user in the prompt. The output of the code is the callibration factor value.

For example:- dist1 = callibrationscale(d)

where d - greyscale image
      dist1- callibration factor

Required Products Image Processing Toolbox
MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (13)
16 Mar 2007 Jos x@y.z

No help, no comments, does not run properly useful without the file 'aa1.dat' ...

16 Mar 2007 Jos x@y.z

forgot to rate this properly ...

17 Mar 2007 islam alabbasy  
17 Mar 2007 John D'Errico

Posting a piece of software for the rest of the world to use would imply it is something you are proud of. If so, why not actually make it usable?

A useful tool would include help. Give someone else a hint why and how they might use this code. Have you ever noticed that all the m-files that the mathworks provides have comment lines on top? This is called "help". In fact, there is not a single comment line in the entire file.

A useful tool would run without error. This one does not.

19 Mar 2007 funny funny

What a annoying comment it is! There is no requirement to the author to explain the details of his/her code. Also the author put the explanation at the description section.
John, are you dumb? read above description carefully!

19 Mar 2007 Jos x@y.z

Always (!!) assume that the user of your code is dumb (or at least, a little dumber than you). That's why good programmers provide extensive help and comments ... to assist people in using your code properly.

I concur with John: if you are proud of your code, show it! Let people see how useful and cleverly written your program is.

19 Mar 2007 Duane Hanselman

funny, funny hit the nail on the head with "There is no requirement to the author to explain the details of his/her code." Absolutely true. Until there is such a requirement, poorly written and documented code submissions will continue to become more frequent here.

19 Mar 2007 Duane Hanselman

Sigh...

funny funny said: "Also the author put the explanation at the description section [above]." With the anything goes rules for the File Exchange, it is legitimate to expect users of this submission to open this web page each and every time they want to read the help for this file.

For that reason, the comment "John, are you dumb? read above description carefully!" has some legitimacy in addition to being disrespectful.

I would love to see a moderated File Exchange to avoid submission like this one and way too many others.

19 Mar 2007 Pepito Piscinas

There is a group of reoffending guys (Duane Hanselman, Jos x and John D'Errico amongst others) who are extremely negative and offensive. I think they post comments to avoid going to therapy. They should be blocked from the mathworks website.
Most people who post files here are not proffessional programmers. A "please include help on how to use the file" would be nice instead of the aggressiveness we are used to guys.
Don't you see that only because of your attitude most people will never post anything else, even when the code may be very good?
If you are soo good, just help.

19 Mar 2007 Duane Hanselman

Is Pepito's assertion "Don't you see that only because of your attitude most people will never post anything else, even when the code may be very good?" Do people purposely post poorly written or documented code just to elicit an "extremely negative and offensive" response from Duane H., Jos x, and John D. amongst others? I am puzzled by this.

19 Mar 2007 John D'Errico

Anyone has the right to disagree with my reviews. I try to spend 30 minutes to an hour on any file that I review, and I try to return to any file that I've rated poorly when improvements are made. My reviews are as honest as I can make them, and they are as thorough as possible. Finally, I try to find as many files that are worth a positive review as I give negative reviews. When a submission does get a "well done" from me, it deserves it. But that "well done" would have no meaning if I was not honest in all my reviews. Finally, I back up my reviews by including my real e-mail address and real name. My detractors might show a little strength of character and do the same instead of making up a name and address.

The author has done some repairs to this code, so it is time for me to reassess my initial review. I was a little worried about the legality of providing the pixval code here, but it appears that pixval is soon to be phased out anyway.

As for the help, callibrationscale.m would benefit from a further clean up. This is an easy thing to do, often no more than a few sentences, so I fail to understand why authors are so frugal.

Currently, the way to get help for this code is to edit it. The top contiguous set of comments are what the function "help" sees, so why not let it work properly? This would have cost the author only a single extra % character to display that extra comment line in the help.

20 Mar 2007 Dimitri Shvorob

OT. Pepito, I couldn't agree more: let's ban John, Jos and Duane (the author of 'Mastering Matlab') so we can continue to post our trivial/redundant/unexplained/sloppy code and feel good about ourselves.

22 Mar 2007 Pepito Piscinas

I'll be as constructive as you guys are.
Review of 'Mastering Matlab7' from Amazon:
"I like the Help button better.
Not only is the on-line Matlab help better, its free. This book is basically a copy of the HELP. I'd give it no stars, but they wont let me."
No wonder he likes the help on the files so much...

The only thing I complain about is negativity, not criticism. The Grumpy Smurf is more positive than you guys.

Please login to add a comment or rating.
Updates
19 Mar 2007

Soory about previous function. This is new and update version with comments and help

19 Mar 2007

New file with help and comments.

Tag Activity for this File
Tag Applied By Date/Time
measurements Gaurav Sehgal 22 Oct 2008 09:04:46
callibration Gaurav Sehgal 22 Oct 2008 09:04:46
image Gaurav Sehgal 22 Oct 2008 09:04:46
pixels Gaurav Sehgal 22 Oct 2008 09:04:46
distances Gaurav Sehgal 22 Oct 2008 09:04:46
grayscale Gaurav Sehgal 22 Oct 2008 09:04:46

Contact us at files@mathworks.com