|
ANY-maze Help > The ANY-maze reference > ANY-maze plug-ins > Plug-in API reference > AME_POSNDATA structure AME_POSNDATA structure
Contains information about the position of the animal during a test. This record is pointed at by the lParam of an AME_POSN message. Syntax
typedef struct { LPVOID Context; DWORD Time_xy; int x; int y; DWORD Time_HeadTail; int hx; int hy; int tx; int ty; int cx, int cy, bool Hidden; RECT AnimalArea; int ResultType; int ResultValue; }AME_POSNDATA, *LPAME_POSNDATA;
MembersContextThe value returned in the Context field of the AME_TESTDATA record passed to the plug-in during AME_TESTSTART processing. This is typically a pointer to a context record structure allocated by the plug-in, but can be any value you want to record (or you can ignore it). Time_xyThe time, in hundredths of a second since the test start, at which the position of the animal's centre point (as reported in x,y) was captured. xThe x-coordinate of the animal's centre position. This is the position typically marked by an orange dot while tracking in ANY-maze. The coordinate system has its origin in the top, left of the video source showing the apparatus. yThe y-coordinate of the animal's centre position. This is the position typically marked by an orange dot while tracking in ANY-maze. The coordinate system has its origin in the top, left of the video source showing the apparatus. Time_HeadTailThe time, in hundredths of a second since the test start, at which the position of the animal's head and tail (as reported in hx,hy and tx,ty) was captured. hxThe x-coordinate of the animal's head position. Note that this value will be passed whether or not the protocol is set to track the animal's head. This value will be -1 until ANY-maze identifies the animal's head for the first time. The coordinate system has its origin in the top, left of the video source showing the apparatus. See notes about head/tail tracking in the Remarks section below. hyThe y-coordinate of the animal's head position. Note that this value will be passed whether or not the protocol is set to track the animal's head. This value will be -1 until ANY-maze identifies the animal's head for the first time. The coordinate system has its origin in the top, left of the video source showing the apparatus. See notes about head/tail tracking in the Remarks section below. txThe x-coordinate of the animal's tail position. Note that tail positions tend to be less stable than head and centre positions (that's to say they are subject to more noise). This value will be -1 until ANY-maze identifies the animal's tail for the first time. The coordinate system has its origin in the top, left of the video source showing the apparatus. See notes about head/tail tracking in the Remarks section below. tyThe y-coordinate of the animal's tail position. Note that tail positions tend to be less stable than head and centre positions (that's to say they are subject to more noise). This value will be -1 until ANY-maze identifies the animal's tail for the first time. The coordinate system has its origin in the top, left of the video source showing the apparatus. See notes about head/tail tracking in the Remarks section below. cxThe x-coordinate of the animal's centre position that corresponds to the head and tail coordinates in hx,hy and tx,ty. See notes about head/tail tracking in the Remarks section below for further details about this value. This value will be -1 until ANY-maze identifies the animal's head/tail for the first time. The coordinate system has its origin in the top, left of the video source showing the apparatus. cyThe y coordinate of the animal's centre position that corresponds to the head and tail coordinates in hx,hy and tx,ty. See notes about head/tail tracking in the Remarks section below for further details about this value. This value will be -1 until ANY-maze identifies the animal's head/tail for the first time. The coordinate system has its origin in the top, left of the video source showing the apparatus. HiddenTrue if the animal is in a hidden zone. In this case none of the coordinate fields are valid (they will all be 0). AnimalAreaA Windows RECT structure which exactly encloses the area of the animal. The coordinate system has its origin in the top, left of the video source showing the apparatus. ResultTypeThis is a return value. You should set this to an RT_xxx value to indicate the type of value your plug-in is returning. If you don't return any value, set this to RT_NONE. ResultValue
This is a return value. Unless you return a ResultType of RT_NONE, you should set this value to the result of your analysis. If the result type is RT_ONOFF, then you should return a value of 1 for 'on' and 0 for 'off'. RemarksANY-maze attempts to track the animal's centre position in all the frames it receives from the video source. If it fails to identify the animal's centre position, then the frame is ignored (from the point of view of results) and it won't be passed to any plug-in. If the centre is tracked successfully, then ANY-maze goes on to try to identify the animal's head and tail positions. If the head and tail are identified successfully, this record will hold data for the centre, head and tail position for the current frame. However, if the head and tail cannot be identified, then this record will hold the coordinates of the animal's centre in this frame and the coordinates of the animal's head and tail in the last frame in which the head and tail were successfully tracked (the time of this frame will be in Time_HeadTail). In this case, you may wish to also know the position of the animal's centre which corresponds to the head and tail positions being passed (i.e. the centre position at time Time_HeadTail) and this is passed in cx,cy. Note that when the head and tail are tracked in a frame, then Time_HeadTail will equal Time_xy and cx,cy will equal x,y).
© Copyright 2003-2026 Stoelting Co. All rights reserved ANY-maze help topic T1024 |