Skip to content

Commit

Permalink
Expose colormap option in scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
ltindall committed Dec 20, 2023
1 parent 5768e23 commit 8a99f49
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gamutrf/grscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class grscan(gr.top_block):
def __init__(
self,
bucket_range=1.0,
colormap=16,
compass=False,
db_clamp_ceil=50,
db_clamp_floor=-200,
Expand Down Expand Up @@ -217,7 +218,7 @@ def __init__(
norm_alpha=0,
norm_beta=1,
norm_type=32, # cv::NORM_MINMAX = 32
colormap=16, # cv::COLORMAP_VIRIDIS = 16, cv::COLORMAP_TURBO = 20,
colormap=colormap, # cv::COLORMAP_VIRIDIS = 16, cv::COLORMAP_TURBO = 20,
interpolation=1, # cv::INTER_LINEAR = 1,
flip=0, # 0 means flipping around the x-axis
min_peak_points=inference_min_db,
Expand Down
8 changes: 8 additions & 0 deletions gamutrf/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,14 @@ def argument_parser():
default=0,
help="if > 1, only send 1/n images for inference",
)
parser.add_argument(
"--colormap",
dest="colormap",
type=int,
default=16,
help="""OpenCV colormap for spectrograms. See
https://docs.opencv.org/4.x/d3/d50/group__imgproc__colormap.html""",
)
return parser


Expand Down

0 comments on commit 8a99f49

Please sign in to comment.