Ask Your Question
0

Storing ORB Keypoints in file

asked 2017-06-16 10:56:05 -0500

Melkarid gravatar image

updated 2017-06-16 11:09:55 -0500

berak gravatar image

I need to store ORB keypoints and descriptors inside some file, and am currently using Pickle but it is slow (~10-15 seconds to load). Is there another way that would allow for faster saving and loading?

I tried using JSON before but could not serialize the objects (since they are complicated). Could anyone provide insight?

edit retag flag offensive close merge delete

Comments

opencv version ?

berak gravatar imageberak ( 2017-06-16 11:10:59 -0500 )edit

Using 3.0.0

Melkarid gravatar imageMelkarid ( 2017-06-16 12:39:57 -0500 )edit
1

ah, shame, so you can't use cv2.FileStorage (requires 3.2 or 3.1)

also, why do you need this ? (what are you trying to do ? need to store keypoints sounds a bit weird)

berak gravatar imageberak ( 2017-06-17 02:32:38 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-05-17 04:59:20 -0500

ZettaCircl gravatar image

Be sure to use the higher version of Pickle protocol. Except if you have very slow I/O, it shouldn't take more than a second.

Use CPickle too, if you can. (You can find numerous benchmark between Pickle, Cpickle, Json ...on stackoverflow)

cPickle.dumps(obj, protocol=pickle.HIGHEST_PROTOCOL)
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-06-16 10:56:05 -0500

Seen: 239 times

Last updated: 2 days ago