Snap rough points to the picture
snapMove rough coordinates onto the image: a quad's corners onto the sign's real corners (its sides fitted to the edges; edgeOf picks a bordered sign's outer or inner edge), a box onto the object's edges, a point onto the nearest corner. Each point comes back with its move (delta), its confidence and whether it moved. Nothing moves farther than 75% of radius or on evidence under 0.6 confidence: that point stays where it was (moved false) and the answer says why. Use it on corners read off a preview before track_plane or a , so a seed is exact rather than a few pixels off. Example: snap({geometry:{type:"quad", space:"preview", previewId:"pv_7q2kxm3a9d", points:[[402,188],[611,201],[604,330],[398,322]], assetId:null, clipId:null, trackId:null, tile:null, time:null}, assetId:"vid_street", clipId:null, at:{seconds:null, atSpace:null}, radius:null, edgeOf:null, to:null, detail:null}). Answers in the geometry's own space and in source, film and film_norm, prose first and one json block after. Free and fast.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | Yes | When to read the frame. | |
| to | Yes | auto (null): a quad's or box's sides fit to edges and its corners where they cross, a line to the nearest edge along it, a point to the nearest strong corner or else edge. corners: every point to the nearest corner. edges: points to the nearest edge. | |
| clipId | Yes | The clip whose frame to read and whose transforms map the answer to the film. Else null. | |
| detail | Yes | How much the answer says: brief is one line per result with its ids; normal (null) adds the transform; full adds every matrix of the chain. | |
| edgeOf | Yes | Which edge of a bordered surface (a sign with a frame) a quad's or a box's sides sit on: outer (the frame's outside), inner (the panel inside it) or auto (null): of the two, the one with clearly more support along the sides, the same kind on every side, else the outer edge. snap and detect_geometry use the same rule, so a quad detect_geometry found does not move when snapped. | |
| radius | Yes | How far to look for evidence, in source pixels, up to 64. A point moves at most 75% of it; a point whose evidence is farther, or under 0.6 confidence, stays put and is named. null: 12. | |
| assetId | Yes | The asset whose frame to read. null: the geometry's assetId, or the asset of clipId. | |
| geometry | Yes | The rough point, box, quad, line or polygon to snap, in any space (a quad read off a preview: space preview and its previewId). | |
| projectId | Yes | The project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs. |