From: chalitha u. P. <cha...@gm...> - 2015-06-16 10:19:26
|
Hi All, I have extracted LocalFeaturesList<ByteDSIFTKeypoint> using Pyramid Dense Sift in OpenIMAJ. As indicated in API documentation, ByteDSIFTKeypoint implements Java Serializable interface and there fore I would like to serialize keypoints for latter use. I tried to serialize keypoints to get a byte array. But when retrieving key-points from the serialized object it loses all field values associated with it. I am using the following code for serialization ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); LocalFeatureList<ByteDSIFTKeypoint> features = psift.getByteKeypoints(); for (ByteDSIFTKeypoint byteDSIFTKeypoint : features) { oos.writeObject(byteDSIFTKeypoint); byte[] bytes = baos.toByteArray(); } Any help regarding how to correctly serialize keypoints is greatly appreciated. Thanks, Chalitha -- J.M Chalitha Udara Perera *Department of Computer Science and Engineering,* *University of Moratuwa,* *Sri Lanka* |