Ask Your Question
0

Size of KeyPoint in Bytes

asked 2015-02-09 01:45:50 -0600

_Student_ gravatar image

Hi OpenCV Guys

I am new to OpenCV , I am dealing with KeyPoint and Mat class . I want to send objects of these two types from server to client using TCP connection , in TCP we need to know the size of the data in bytes to be sent through a socket . So far I am using total()*channels() to get the number of bytes in Mat Type .

My questions : 1- I am not sure if my using total()*channels() in Mat Type is correct . 2- How can I know the size of KeyPoint in BYTES .

I appreciate any help .

edit retag flag offensive close merge delete

Comments

cerr << sizeof(KeyPoint);

28

for the Mat bytes, total() * elemSize() might be the better formula.

berak gravatar imageberak ( 2015-02-09 01:53:19 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-02-09 02:07:05 -0600

_Student_ gravatar image

Thank you barek .

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-02-09 01:45:50 -0600

Seen: 259 times

Last updated: Feb 09 '15