MCPcopy Create free account
hub / github.com/daniel-e/rustml / rectangle

Method rectangle

src/opencv/mod.rs:656–666  ·  view source on GitHub ↗

TODO test

(&self, x: usize, y: usize, width: usize, height: usize)

Source from the content-addressed store, hash-verified

654
655 // TODO test
656 pub fn rectangle(&self, x: usize, y: usize, width: usize, height: usize) -> Vec<u8> {
657
658 // TODO bounce checking
659 let mut v = Vec::new();
660 for i in (y..y+height) {
661 for j in (x..x+width) {
662 v.push(self.pixel(j, i).unwrap().val);
663 }
664 }
665 v
666 }
667
668 pub fn mask_iter<'q>(&'q self, i: &'q GrayImage) -> MaskIter {
669

Callers

nothing calls this directly

Calls 1

pixelMethod · 0.80

Tested by

no test coverage detected