From: Schmeitz, H. <har...@ph...> - 2008-10-15 15:00:58
|
Hi Pawel, Your suggestion would indeed allow users to choose their interpretation. I assume the default will be "Binary offset", as this was the only mode in older versions of PV. Having the selection in PV does not solve the root cause: why are multiple vector interpretations used? Here at research we have defined motion vectors to be (I think it is also implemented in PV like this): - positive in the positive direction of time and frame coordinates (upper left is 0,0) - for 8 bit components: fixed point, with 1/4 pixel accuracy (6.2 fixed point) and offset 128 - for 16 bit components: fixed point, with 1/16 pixel accuracy (12.4 fixed point) and offset 32768 - for float components: floating point, gain=1, offset=0 Remember that a simple truncation of signed integers to signed bytes does not necessarily preserve the sign. Having to convert with an offset usually catches these overflow conditions (clipping should be applied of course). Regards, Harold ________________________________ From: Pawel Kruszynski [mailto:paw...@nx...] Sent: Wednesday 15 October 2008 16:00 To: pfs...@li... Subject: [Pfs...@sf...] pv - Vector interpretation modification Hi all, Present version of pv supports automatic detection of vector interpretation. There are two possible interpretations: two's complement (if bytes are signed), and binary offset, if values are calculated with respect to offset 128. The method used in present version of pv is based on statistics, and it is not always reliable. Therefore we are going to modify the processing of vector interpretation. Proposed modification consists in: 1. Disable auto-detection of the vector interpretation per frame and per component (function pfspd_Image::measure_pfspd_comp_two_comp) 2. Introduce user control from View menu: New menu item "Vector interpretation", with submenu items "Next vector interpretation", "Previous vector interpretation". Selecting one of them toggles between "Two's complement" and "Binary offset". Keys - "b" and "Shift b". The submenu items "Two's complement" and "Binary Offset" allow for direct selection. 3. Allow default value to be set in an init file and in command line by means of options "-binoffset" and "-2scomplement". Note - the vector interpretation selection is valid for all frames and components, unless changed by the user. Each new window starts with the default setting. Affected modules: cmdl_options.h format_convert.c frame.cc frame.h pfspd.cc pfspd.h settings.cc settings.h All comments and remarks are very much welcome Kind regards Pawel Kruszynski, Clemens Wust, Bram Rimens P. Kruszyński, Ph.D. NXP Semiconductors (founded by Philips) Corporate I&T/Research System & Algorithms High Tech Campus 32 room 1.38 5656 AE Eindhoven The Netherlands tel. +31(0)40-2725898 fax. +31402744639 gsm +31(0)629023208 ________________________________ The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message. |