Doctor Gave us rule to sector for each pixel which is theta = tan-1 y-yc/x-xc then s = [ theta/360 *S] in case theta is in degrees So if y-yc/ x-xc is negative, all values will be negative even sector value ,so what shall we do in this case ???
Question two : if theta in radians then s= theta *S , right ??
Eng.Tawfiq Reply
in the case of the angle is negative , you need to add to it 360 to get right angle in positive in case of radians s=(theta/(2*pi) ) * S
I faced a problem in Assignment 2 when implementing the Minimum Sum Square error algorithm I get the matrix z which is 30 * 65 so z' * z introduce 30 * 30 matrix with no problem until now then the step of applying inverse doesn't work as the determinant for all Zs is zero and with considering : 1) if any two rows (or columns) of A are the same, then det A = 0. 2) if all the entries in one row or one column are zero, then the determinant is zero.
it is very likely for rule (2) to happen as it can exist one direction in a sector with certain track to be 0 for all pictures :-/ any idea :-?
Thanks, Sara Maher Mohammad 4th year CS-IT dep FCI-CU
Eng.Yassin Reply for The Same Question /* Doctor Gave us rule to sector for each pixel which is theta = tan-1 y-yc/x-xc then s = [ theta/360 *S] in case theta is in degrees So if y-yc/ x-xc is negative, all values will be negative even sector value ,so what shall we do in this case ???
Question two : if theta in radians then s= theta *S , right ?? */
- Concerning your questions, atan2 Matlab function returns the angle in radians between the positive x-axis of a plane and the point. The angle is positive for upper half-plane where y > 0, and negative for lower half-plane where y < 0. So, what you should do is:
1- Convert the angle from radians to degrees --> degreeTheta = radianTheta * 180/pi 2- If the angle is negative, then add 360 to it. 3- Use the rule s = (degreeTheta/360) * S to get the sector. 4- You'll get confusing sector numbers, but it's right (because the origin point (0,0) in computer is up-left not down-left and x-axis, y-axis are swapped than traditional ones).
Email to Eng.Tawfiq
ReplyDeleteQuestions :
Doctor Gave us rule to sector for each pixel which is
theta = tan-1 y-yc/x-xc
then s = [ theta/360 *S]
in case theta is in degrees
So if y-yc/ x-xc is negative, all values will be negative even sector value ,so what shall we do in this case ???
Question two :
if theta in radians
then s= theta *S , right ??
Eng.Tawfiq Reply
in the case of the angle is negative , you need to add to it 360 to get right angle in positive
in case of radians
s=(theta/(2*pi) ) * S
Salam Alaykom ,
ReplyDeleteI faced a problem in Assignment 2 when implementing the Minimum Sum Square error algorithm
I get the matrix z which is 30 * 65 so z' * z introduce 30 * 30 matrix with no problem until now
then the step of applying inverse doesn't work as the determinant for all Zs is zero
and with considering :
1) if any two rows (or columns) of A are the same, then det A = 0.
2) if all the entries in one row or one column are zero, then the determinant is zero.
it is very likely for rule (2) to happen as it can exist one direction in a sector with certain track to be 0 for all pictures :-/
any idea :-?
Thanks,
Sara Maher Mohammad
4th year CS-IT dep
FCI-CU
Eng.Yassin Reply for The Same Question
ReplyDelete/*
Doctor Gave us rule to sector for each pixel which is
theta = tan-1 y-yc/x-xc
then s = [ theta/360 *S]
in case theta is in degrees
So if y-yc/ x-xc is negative, all values will be negative even sector value ,so what shall we do in this case ???
Question two :
if theta in radians
then s= theta *S , right ??
*/
- Concerning your questions, atan2 Matlab function returns the angle in radians between the positive x-axis of a plane and the point. The angle is positive for upper half-plane where y > 0, and negative for lower half-plane where y < 0. So, what you should do is:
1- Convert the angle from radians to degrees --> degreeTheta = radianTheta * 180/pi
2- If the angle is negative, then add 360 to it.
3- Use the rule s = (degreeTheta/360) * S to get the sector.
4- You'll get confusing sector numbers, but it's right (because the origin point (0,0) in computer is up-left not down-left and x-axis, y-axis are swapped than traditional ones).
Best Regards,