Tech
Forums
Jobs
Books
Events
Live
Interviews Prep
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
finding the gradient from image pixels..
hanna banana
Dec 29 2011 1:12 PM
1.5k
Reply
i have problem in calculating and finding gradients of pixels
int gradient1 = (y1 - y5) / (x1 - x5);
int gradient2 = (y2 - y5) / (x2 - x5);
from the image shown and the gradients calculations.. supposedly gradient1 = +ve value and gradient2 = -ve value..
but from the result i get both gradients are "0" i don't know where i have it wrong here.. if anyone could help me point out the mistake i've made.. thank you..
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
How do I add sound?
API for Google Earth to plot points