File: find_points.docstring

package info (click to toggle)
mrgingham 1.26-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 420 kB
  • sloc: cpp: 2,285; ansic: 479; sh: 364; python: 280; makefile: 92
file content (46 lines) | stat: -rw-r--r-- 1,764 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Finds corner or blob features in an image

SYNOPSIS

    corners = mrgingham.find_points(image)

    [ corners is an array of shape (N,2), the unordered list of ]
    [ detected feature coordinates in the image ]

This function runs just the initial stage of the mrgingham processing:

- pre-process image
- find chessboard corners (or blobs)

This function does NOT look for the grid in the feature set

No broadcasting is supported by this function

ARGUMENTS

- image: numpy array of shape (H,W) and dtype np.uint8. This is the image we're
  processing. Must be densely-stored, grayscale image

- blobs: optional boolean, defaulting to False. If True, we look for
  black-on-white blobs, instead of chessboard corners. If blobs: we MUST have
  image_pyramid_level==0

- image_pyramid_level: optional integer defaulting to -1. This can be given to
  operate on a downsampled version of the image. 0 means "original image", 1
  means "downsample by a factor of 2 in each dimension", 2 means "downsample by
  a factor of 4 in each dimension" and so on. image_pyramid_level < 0 (the
  default) means "start with a downsampled image, and then refine the results by
  repeatedly reducing the downsampling. If blobs: image_pyramid_level==0 is the
  only allowed option

- debug: optional boolean, defaulting to False. If True, this will dump various
  intermediate results into /tmp and it will report more stuff on standard out.
  Most of the intermediate results are self-plotting data files. Run them. This
  does the same thing as "mrgingham --debug"; the Python output is unaffected.

RETURNED VALUE

A numpy array of shape (N,2) containing unordered pixel coordinates of the
discovered features. If no features were found, and array of shape (0,2) is
returned.