Libraryless. Click here for Pure Java version (6821L/41K).
// Look for motion between 2 images // We only do one channel srecord noeq LookForMotion( IIntegralImage img1, IIntegralImage img2, int splitDepth // how often to split - our new, more intuitive measure over "featureSize" ) extends Probabilistic { bool verbose; record LookAtClip(Rect r) implements Runnable { run { // check whether image brightness has changed over the last image // if not: guess "no motion" // if yes: guess "motion" // split image // repeat procedure for each part of image } } run { schedule(root()); } LookAtClip root() { assertEquals("Sizes of compared images have to be equal", img1.getSize(), img2.getSize()); ret new LookAtClip(imageRect(img1)); } }
Began life as a copy of #1032159
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
Snippet ID: | #1032464 |
Snippet name: | LookForMotion [dev.] |
Eternal ID of this version: | #1032464/4 |
Text MD5: | 8ff80fcebee617d54ba8738e422c0c51 |
Transpilation MD5: | e0aca69580968e05eef62c2587962e56 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-09-08 03:57:18 |
Source code size: | 790 bytes / 27 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 132 / 195 |
Version history: | 3 change(s) |
Referenced in: | [show references] |