Giter Club home page Giter Club logo

Comments (7)

yzrobot avatar yzrobot commented on July 18, 2024

Hi, which function are you referring to? compute3ZoneCovarianceMatrix or computeMomentOfInertiaTensorNormalized

from online_learning.

RussellGee avatar RussellGee commented on July 18, 2024

refer to the function compute3ZoneCovarianceMatrix. Sorry, i make some error before, the elements used are as fellows:
partial_covariance_2d[i3+0] = covariance(0,0);
partial_covariance_2d[i
3+1] = covariance(0,1);
partial_covariance_2d[i*3+2] = covariance(1,1);

from online_learning.

yzrobot avatar yzrobot commented on July 18, 2024

So I guess you refer to this block?

  Eigen::Matrix3f covariance;
  Eigen::Vector4f centroid;
  for(int i = 0; i < 3; i++) {
    pcl::compute3DCentroid(*zone_decomposed[i], centroid);
    pcl::computeCovarianceMatrix(*zone_decomposed[i], centroid, covariance);
    partial_covariance_2d[i*3+0] = covariance(0,0);
    partial_covariance_2d[i*3+1] = covariance(0,1);
    partial_covariance_2d[i*3+2] = covariance(1,1);
  }

As the original paper said These zones are the upper half, and the left and right lower halves. After separating the points into these zones, we calculate the covariance matrix (in 2D) over the transformed points laying inside each zone.This results in 9 additional features (3 unique values from each zone).

from online_learning.

RussellGee avatar RussellGee commented on July 18, 2024

Hi, Yan, @yzrobot, thank you for your reply first.
May i have your explanation of why have you chosed 3D cov-matirx, not the 2D cov-matirx(the original paper said).
In addition, I have doubt about that "whether two cov-matirxs are equivalent if the eigenvectors and eigenvlaues are equal responding or not".
I appreciate your help, looking forward your replay.

from online_learning.

RussellGee avatar RussellGee commented on July 18, 2024

Then, I take a test, in the following block:

computeProjectedPlane(pc, pca.getEigenVectors(), 2, centroid, main_plane);
compute3ZoneCovarianceMatrix(main_plane, pca.getMean(), f.partial_covariance_2d);

The cov-matrix from the upper zone from "main_plane" is defined as main_plane_upper_cov_matrix.
As the original paper said "we calculate the covariance matrix (in 2D) over the transformed points laying inside each zone",
i conduct PCA process on "main_plane".

    computeProjectedPlane(pc, pca.getEigenVectors(), 2, centroid, main_plane);

    pcl::PCA<pcl::PointXYZI> main_plane_pca;
    pcl::PointCloud<pcl::PointXYZI>::Ptr main_plane_projected(new pcl::PointCloud<pcl::PointXYZI>);
    main_plane_pca.setInputCloud(main_plane);
    main_plane_pca.project(*main_plane, *main_plane_projected);

    pcl::PCA<pcl::PointXYZI> main_plane_pca_for_3zone;
    pcl::PointCloud<pcl::PointXYZI>::Ptr main_plane_pc_projected_(new pcl::PointCloud<pcl::PointXYZI>);
    main_plane_pca_for_3zone.setInputCloud(main_plane_pc_projected);
    main_plane_pca_for_3zone.project(*main_plane_pc_projected, *main_plane_pc_projected_);

    compute3ZoneCovarianceMatrix(main_plane_pc_projected, main_plane_pca_for_3zone.getMean(), f.partial_covariance_2d);

The cov-matrix from the upper zone from "main_plane_pc_projected" is defined as main_plane_prj_upper_cov_matrix.
I found that the eigenvalues of main_plane_upper_cov_matrix is same to main_plane_prj_upper_cov_matrix.
Then main_plane_upper_cov_matrix and main_plane_prj_upper_cov_matrix is similar matrix.

But i still do not understand why have you chose(0,0),(0,1),(1,1)elements of main_plane_upper_cov_matrix.How do you ensure that main_plane_upper_cov_matrix only have 3 unique elements.

Finally, i wonder that why papers chose cov-matrix as the feature of points in 3 zone. I have known that cov-matrix is the key of PCA analysis and PCA analysis is the common way for data analysis.

And as the original paper said that

We focus on the points included in the main plane, to analyze the ### patterns that would correspond to the legs and trunk of a pedestrian, as shown in Fig 3, center top. These zones are the upper half, and the left and right lower halves. After separating the points into these zones, we calculate the covariance matrix (in 2D) over the transformed points laying inside each zone. This results in 9 additional features (3 unique values from each zone)

How does cov-matrix represent the "patterns" of these zones.
Is there any papers or blogs explain this.
Looking forward your replay.

from online_learning.

yzrobot avatar yzrobot commented on July 18, 2024

Hi, the implementation was followed the original paper Sec. 3.3.1 and the source code of pcl::compute3DCentroid and pcl::computeCovarianceMatrix, and I think the original text and code could help you understand. Cheers.

from online_learning.

RussellGee avatar RussellGee commented on July 18, 2024

Thank you for your replay. I have know that cov-matrix represent the correlation between variables which similar to variance。Thank you again.

from online_learning.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.