새로 가공한 AR Marker 상자.
2014년 1월 24일 금요일
2013년 12월 19일 목요일
PCA in PCL
/////////////////////////////////////////////////////////////////////////////////////////
template
pcl::PCA
{
if(!Base::initCompute ())
{
PCL_THROW_EXCEPTION (InitFailedException, "[pcl::PCA::initCompute] failed");
return (false);
}
if(indices_->size () < 3)
{
PCL_THROW_EXCEPTION (InitFailedException, "[pcl::PCA::initCompute] number of points < 3");
return (false);
}
// Compute mean
mean_ = Eigen::Vector4f::Zero ();
compute3DCentroid (*input_, *indices_, mean_);
// Compute demeanished cloud
Eigen::MatrixXf cloud_demean;
demeanPointCloud (*input_, *indices_, mean_, cloud_demean);
assert (cloud_demean.cols () == int (indices_->size ()));
// Compute the product cloud_demean * cloud_demean^T
Eigen::Matrix3f alpha = cloud_demean.topRows<3> () * cloud_demean.topRows<3> ().transpose ();3>3>
// Compute eigen vectors and values
Eigen::SelfAdjointEigenSolver
// Organize eigenvectors and eigenvalues in ascendent order
for (int i = 0; i < 3; ++i)
{
eigenvalues_[i] = evd.eigenvalues () [2-i];
eigenvectors_.col (i) = evd.eigenvectors ().col (2-i);
}
// If not basis only then compute the coefficients
if (!basis_only_)
coefficients_ = eigenvectors_.transpose() * cloud_demean.topRows<3> ();3>
compute_done_ = true;
return (true);
}
from /opt/ros/fuerte/include/pcl-1.5/pcl/common/impl/pca.hpp
2013년 12월 12일 목요일
Z-Y-X Euler Angles
Z-Y-X Euler Angles
Z-Y-X Euler Angles (or X-Y-Z fixed angles)
Rx'y'z' (a,b,c) =
[ cos(a)*cos(b), cos(a)*sin(b)*sin(c) - cos(c)*sin(a), sin(a)*sin(c) + cos(a)*cos(c)*sin(b)]
[ cos(b)*sin(a), cos(a)*cos(c) + sin(a)*sin(b)*sin(c), cos(c)*sin(a)*sin(b) - cos(a)*sin(c)]
[ -sin(b), cos(b)*sin(c), cos(b)*cos(c)]
X-Y-Z Euler Angles
Rz'y'x' (a,b,c) =
[ cos(b)*cos(c), -cos(b)*sin(c), sin(b)]
[ cos(a)*sin(c) + cos(c)*sin(a)*sin(b), cos(a)*cos(c) - sin(a)*sin(b)*sin(c), -cos(b)*sin(a)]
[ sin(a)*sin(c) - cos(a)*cos(c)*sin(b), cos(c)*sin(a) + cos(a)*sin(b)*sin(c), cos(a)*cos(b)]
Z-Y-X Euler Angles (or X-Y-Z fixed angles)
Rx'y'z' (a,b,c) =
[ cos(a)*cos(b), cos(a)*sin(b)*sin(c) - cos(c)*sin(a), sin(a)*sin(c) + cos(a)*cos(c)*sin(b)]
[ cos(b)*sin(a), cos(a)*cos(c) + sin(a)*sin(b)*sin(c), cos(c)*sin(a)*sin(b) - cos(a)*sin(c)]
[ -sin(b), cos(b)*sin(c), cos(b)*cos(c)]
X-Y-Z Euler Angles
Rz'y'x' (a,b,c) =
[ cos(b)*cos(c), -cos(b)*sin(c), sin(b)]
[ cos(a)*sin(c) + cos(c)*sin(a)*sin(b), cos(a)*cos(c) - sin(a)*sin(b)*sin(c), -cos(b)*sin(a)]
[ sin(a)*sin(c) - cos(a)*cos(c)*sin(b), cos(c)*sin(a) + cos(a)*sin(b)*sin(c), cos(a)*cos(b)]
Rz'y'x' (c,b,a) =
[ cos(a)*cos(b), -cos(b)*sin(a), sin(b)]
[ cos(c)*sin(a) + cos(a)*sin(b)*sin(c), cos(a)*cos(c) - sin(a)*sin(b)*sin(c), -cos(b)*sin(c)]
[ sin(a)*sin(c) - cos(a)*cos(c)*sin(b), cos(a)*sin(c) + cos(c)*sin(a)*sin(b), cos(b)*cos(c)]
[ cos(a)*cos(b), -cos(b)*sin(a), sin(b)]
[ cos(c)*sin(a) + cos(a)*sin(b)*sin(c), cos(a)*cos(c) - sin(a)*sin(b)*sin(c), -cos(b)*sin(c)]
[ sin(a)*sin(c) - cos(a)*cos(c)*sin(b), cos(a)*sin(c) + cos(c)*sin(a)*sin(b), cos(b)*cos(c)]
2013년 10월 31일 목요일
Nikola Tesla
“If you want to find the secrets of the universe, think in terms of energy, frequency and vibration.”
― Nikola Tesla
― Nikola Tesla
2013년 10월 27일 일요일
ARCBALL
회전축과 회전각도를 결정하여 회전 Quaternion 을 구해냄.
마우스 입력으로 3차원 회전축과 각도를 어떻게 결정하는지 알면 끝.
현재점과 anchor 점을 결정할 때 2D 입력을 spherical mapping을 사용하여 3D Vector로 mapping.
본 논문 :
ARCBALL: a user interface for specifying three-dimensional orientation using a mousehttp://dl.acm.org/citation.cfm?id=155312
2013년 10월 24일 목요일
2013년 10월 20일 일요일
Take Screenshot After Some Delay: gnome-screenshot
$ gnome-screenshot -w -d 2
-d 2 is used for delaying the screenshot for 2 seconds. So within the 2 seconds, we can make the window which we want to take screenshot as active.
2013년 9월 1일 일요일
Curvature
Geometry perception 과 관련하여:
Larger curves explored by touching multiple points, whether statically or dynamically, appear to be judged by the difference in local slope at different points of contact (Pont, 1997; Pont, Kappers, & Koenderink, 1999).
from Lederman, Susan J., and Roberta L. Klatzky. "Haptic perception: A tutorial." Attention, Perception, & Psychophysics 71.7 (2009): 1439-1459.
Pont, S. C. (1997). Haptic curvature comparison. Unpublished doctoral
dissertation, Helmholz Instituut, Utrecht.
Pont, S. C., Kappers, A. M. L., & Koenderink, J. J. (1999). Similar mechanisms underlie curvature comparison by static and dynamic touch. Perception & Psychophysics, 61, 874-894.
피드 구독하기:
글 (Atom)






