|
From: Jarda K. <jar...@gm...> - 2011-01-18 17:59:42
|
Hi I am experimenting with libdmtx on iPhone 3GS. I get image from video stream and then I pass it to libdmtx to recognise it and if it is not recognised I capture another image and so on. It works good - it reads quite small data matrix codes (about 8mm wide). I use timeout option to don't get stucked for long time when there is no data matrix on picture. Most time consuming is finding data matrix in picture (dmtxRegionFindNext(dmtxDecode, &timeout) ); - I can't get better time (setting lower timeout doesn't have affect) then 3s when there is no data matrix on picture and about 1.5s when datamatrix is detected. On macbook (2.4Ghz) it takes about 30ms on picture with same resolution. And surprised me that when I tried to capture image 200x200px instead of 300x300px it didn't improve performance - or at least no significantly (I will test this more tomorrow). I would expect that it will need only half of time when area is half. According to time profiler in xcode are following methods most time consuming: FindBestSolidLine - 19% dmtxMatrix3VMultiply - 18.5% ReadModuleColor - 14.3 % And I tried these tests with 'Release' profile in xcode which gives best performance. Have anyone idea how can I tweak performance little bit? Has anyone tried libdmtx on iPhone? Thanks! regards Jarda |