public override LocationMark2D addLocationMark(int resultFrameNo, LocationMark2D added) { if (added is RectangleLocationMark) { var addedBoundingBox = (added as RectangleLocationMark).boundingBox; return new RectangleLocationMark(resultFrameNo, new RectangleF(boundingBox.X + addedBoundingBox.X, boundingBox.Y + addedBoundingBox.Y, boundingBox.Width + addedBoundingBox.Width, boundingBox.Height + addedBoundingBox.Height)); } else { throw new ArgumentException(" Adding location mark needs to be of the same type !"); } }
public override LocationMark2D addLocationMark(int resultFrameNo, LocationMark2D added) { if (added is RigLocationMark2D) { var addedRigFigure = (added as RigLocationMark2D).rigFigure; return new RigLocationMark2D(resultFrameNo, new RigFigure<PointF>((rigFigure as RigFigure<PointF>).rigJoints.ToDictionary( k => k.Key, k => k.Value.scalePoint(1, addedRigFigure.rigJoints[k.Key] )), rigFigure.rigBones)); } else { throw new ArgumentException(" Adding location mark needs to be of the same type !"); } }
public virtual LocationMark2D addLocationMark(int resultFrameNo, LocationMark2D added) { return null; }
public void setBounding(int frameNumber, LocationMark2D locationMark) { objectMarks[frameNumber] = locationMark; }