Public Struct

Hello i have a problem i have an extern class

00053 class RangeImageBorderExtractor : public Feature<PointWithRange,BorderDescription>
00054 {
00055 public:
00056 // =====TYPEDEFS=====
00057 typedef Feature<PointWithRange,BorderDescription> BaseClass;
00058
00059 // =====PUBLIC STRUCTS=====
00061 struct LocalSurface
00062 {
00063 Eigen::Vector3f normal;
00064 Eigen::Vector3f neighborhood_mean;
00065 Eigen::Vector3f eigen_values;
00066 Eigen::Vector3f normal_no_jumps;
00067 Eigen::Vector3f neighborhood_mean_no_jumps;
00068 Eigen::Vector3f eigen_values_no_jumps;
00069 float max_neighbor_distance_squared;
00070 };
00072 struct ShadowBorderIndices {

with the LocalSurface

In my Code i want the normal vector so i do

pcl::RangeImageBorderExtractor border_extractor (&range_image);
border_extractor.getSurfaceStructure(); -> this fuc write the localsurface

--------------
00150 LocalSurface**
00151 getSurfaceStructure () { extractLocalSurfaceStructure (); return surface_structure_; }
----------------

so now how i get the normal vector out of it ? I have problem with the doppelpointer and dont understand how i get this out...

I hope you can help me and i give u enough information.

Thanks for help




if you have ** it may be an array. if not you can write
1
2
LocalSurface**ls = getSurfaceStructure ();
(*ls)->normal
hello
i have tested it now and it doesnt work

pcl::RangeImageBorderExtractor border_extractor(&range_image);
border_extractor.LocalSurface** ls=border_extractor.getSurfaceStructure();
float x=(*ls)->normal;

it is not an array but a struct.
This is my error and i have no idea why i cant use it this way.
The struct is defined in RangeImageBorderExtractor as public how u can see in my first post

error: invalid use of ‘struct pcl::RangeImageBorderExtractor::LocalSurface’
closed account (DSLq5Di1)
RangeImageBorderExtractor::LocalSurface** ls = border_extractor.getSurfaceStructure();
ok thank you that work now

pcl::RangeImageBorderExtractor border_extractor(&range_image);
pcl::RangeImageBorderExtractor::LocalSurface** ls = border_extractor.getSurfaceStructure();
ROS_INFO_STREAM("TEST" << (*ls)->normal);

the problem is i dont get the normal vector
line 3 produce this failure
undefined reference to `pcl::RangeImageBorderExtractor::~RangeImageBorderExtractor()'

i dont now what to do...
It is possible that the struct could be an array ? I think the function safe for every point one normal so it must be an array.
How i get with an array the normal vector?
My idea was (*ls)->normal[0] for x coordinate
but same failure...

thanks for help

and do you know a good tutorial for this problem ?
i have the failure now , the problem was die cmakefile

now i have the problem that i want now how big the array ls is
for normal arrays i can do
int size = sizeof(ls)/sizeof(ls[0])

but when i do that i always get one and that is wrong
i only want the lengeth of the array from the normals
Last edited on
can nobody help?
now i have the problem that i want now how big the array ls is
The size of a dynamic array must be stored separately. Maybe something like border_extractor.getSurfaceSize();
closed account (DSLq5Di1)
I'm not really certain either sorry.. I'd recommend you ask at the point cloud forums,
http://www.pcl-users.org/
Topic archived. No new replies allowed.