۰۴-۵-۱۳۹۰, ۰۵:۵۴ بعد از ظهر
|
#1 (لینک دائم)
|
عضو جدید
تاريخ عضويت: دي ۱۳۸۸
پست ها: 5
تشكرها: 0
0 تشكر در 0 پست
|
کمک در زمینه تشخیص اشیا
با سلام خدمت تمامی دوستان عزیز
دوستان من در نوشتن سودوکدASIFTبه زبان برنامه نویسی مطلب مشکل دارم.
خواهش می کنم کمکم کنید .برنامه مربوط می شه به پایان نامه ام اگه نتونم بنویسمش یعنی هیچی دیگه
من کد Sift رو دارم،اینی که می خوام کمکم کنید کد ASIFT در تشخیص اشیا هستش.
سایتی که سودوکد رو برداشتمش
IPOL: ASIFT: An Algorithm for Fully Affine Invariant Comparison
سودو کدش رو در زیر می ذارم براتون اگه کسی هست که بتونم باهاش گام به گام جلو برم کمک بزرگی در حق من کرده ممنون از همگی
Input:
image u
Input parameters:
1. Tilt sampling step: \delta_t = \sqrt{2}
2. Tilt sampling range: n = 5
3. Rotation sampling step factor: b = 72
Output: ASIFT keypoints key
// loop over tilts
for t = 1, \delta_t, \delta_t^2, ..., \delta_t^n
{
// when t = 1 (no tilt), no need to simulate rotation
if ( t == 1 )
{
theta = 0;
// calculate SIFT on the original image
key(t, theta) = SIFT(u)
}
else
{
// loop over rotations (angle in degree)
for theta = 0, b/t, 2b/t, ..., kb/t (such that kb/t < 180)
{
// Rotate image (with bilinear interpolation)
u_r = rot(u, theta)
// Anti-aliasing filtering (G_{0.8t} is a Gaussian convolution with kernel standard deviation equal to 0.8t)
u_f = G_{0.8t} u_r
// Tilt image (subsample in vertical direction by a factor of t)
u_t = tilt(u_f, t)
// Calculate SIFT features
key(t, theta) = SIFT(u_t)
Remove the keypoints close to the boundary of the rotated and tilted image support (parallelogram) in u_t.
The distance threshold is set equal to 6\sqrt{2} times the scale of each keypoint.
Normalize the coordinates of the keypoints from the rotated and tilted image u_t to the original image u.
}
}
}
Pseudocode of ASIFT feature comparison
Input:
ASIFT keypoints of the two images: key1 and key2
Output:
Matched keypoints: matchinglist
// loop over tilts on image 1
for t1 = 1, \delta_t, \delta_t^2, ..., \delta_t^n
{
// when t1 = 1 (no tilt), no rotation simulated
if ( t1 == 1 )
{
theta1_all = [0]
}
else
{
theta1_all = [0, b/t1, 2b/t1, ..., kb/t1] (such that kb/t1 < 180)
}
// loop over rotations on image 1 (angle in degree)
for theta1 = theta1_all[1], ..., theta1_all[end]
// loop over tilts on image 2
for t2 = 1, \delta_t, \delta_t^2, ..., \delta_t^n
{
// when t2 = 1 (no tilt), no rotation simulated
if ( t2 == 1 )
{
theta2_all = [0]
}
else
{
theta2_all = [0, b/t2, 2b/t2, ..., kb/t2] (such that kb/t2 < 180)
}
// loop over rotations on image 2 (angle in degree)
for theta2 = theta2_all[1], ..., theta2_all[end]
{
// Matching the SIFT keypoints between the two simulated images
matchinglist(t1, theta1, t2, theta2) = SIFT_match(keys1(t1, theta1), keys2(t2, theta2))
}
}
}
Reshape matchinglist to a 1D vector (the tilt and rotation parameters are no longer useful).
// matchinglist may contain identical matches which were obtained in different simulated image pairs.
Remove the identical matches in matchinglist (retain only 1).
(Two matches are considered identical if the distances between the points in both ends are small than \sqrt{2}.)
// On interpolated images, SIFT is sometimes subject to an artifact: one
// keypoint in one image is matched with multiple keypoints in the other image.
// These are false matches which must be detected and removed.
Remove all the matches such that a keypoint in one image is matched with multiple keypoints in another image.
(A keypoint is considered matched with multiple keypoints if the distance between the points is smaller than 1
in one end and larger than 2 in the other.)
// Eliminate false matches by epipolar geometry filtering \[8\]
matchinglist = ORSA(matchinglist)
|
|
|