Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6646065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:22:13+00:00 2026-05-26T00:22:13+00:00

I have what I think is a fairly basic question about a conversion in

  • 0

I have what I think is a fairly basic question about a conversion in the point cloud library from a proprietry data type to float. My issue I think comes from a lack of experience with templates, data types and C++ in general.

The function that should perform this conversion is copyToFloatArray, defined in the documentation as:

virtual void pcl::DefaultPointRepresentation< FPFHSignature33 >::copyToFloatArray ( const FPFHSignature33 & p,
float * out
) const [inline, virtual]

Copy point data from input point to a float array.

This method must be overriden in all subclasses.

Parameters:

p The input point

out A pointer to a float array.

Implements pcl::PointRepresentation< FPFHSignature33 >.

I have attempted to implement it as follows:

pcl::PointCloud<pcl::FPFHSignature33>::Ptr fpfhs (new pcl::PointCloud<pcl::FPFHSignature33> ());
// populate fpfh...
float **myArray;
pcl::DefaultPointRepresentation< pcl::FPFHSignature33 >::copyToFloatArray ( &fpfhs, &**myArray);

The error that’s thrown up at compilation time is as follows:

/home/bc/PCL/pcd_read.cpp: In function ‘int main(int, char**)’:
/home/bc/PCL/pcd_read.cpp:68: error: no matching function for call to 
‘pcl::DefaultPointRepresentation<pcl::FPFHSignature33>::copyToFloatArray(boost::shared_ptr<pcl::PointCloud<pcl::FPFHSignature33> >*, float*)’
/usr/include/pcl-1.2/pcl/point_representation.h:254: note: candidates are: 
virtual void pcl::DefaultPointRepresentation<pcl::FPFHSignature33>::copyToFloatArray(const pcl::FPFHSignature33&, float*) const
make[2]: *** [CMakeFiles/pcd_read.dir/pcd_read.cpp.o] Error 1
make[1]: *** [CMakeFiles/pcd_read.dir/all] Error 2
make: *** [all] Error 2

It appears that the issue is in the first argument being passed to the function, but I can’t seem to create a const FPFHSignature33 & p object.

Does anyone have any idea if these suspicions are correct, and if so what direction I might take to start to resolve the issue?

Thanks for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:22:14+00:00Added an answer on May 26, 2026 at 12:22 am

    First, you need to allocate memory in your floatArray.
    Then, you need to derefence the fpfhs ptr using *. finally, there is no need for a double pointer array there.

    Here is the corrected code :

    pcl::PointCloud<pcl::FPFHSignature33>::Ptr fpfhs (new pcl::PointCloud<pcl::FPFHSignature33> ());
    // populate fpfh...
    float *myArray = new float[ 3* point_count ];
    pcl::DefaultPointRepresentation< pcl::FPFHSignature33 >::copyToFloatArray ( *fpfhs, myArray);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have what I think should be a fairly simple mapping issue, but not
I'm used to doing Java programming, where you never really have to think about
Screen is amazing, of course, but I don't want to have to think about
I think I have a synchronization problem...It may be too basic..Please help.. I have
I think I have a basic understanding of REST, but something I'm stuck on
I have -- what I think -- is a simple question. Here's my code:
I am writing a wordpress theme, and have run into a fairly basic problem.
My web app, up until this point, has been fairly straight forward. I have
I have an app where I need to prevent users from editing data while
I am writing a fairly large and complex data analysis program and I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.