npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nextmeters/lcd-check

v1.0.0

Published

Package that provides the ability to check lcd segments for quality control purposes

Readme

nm-lcd-check

Overview

nm-lcd-check verifies the status of segments on an LCD screen. Given photos of a device, it locates the LCD screen in each image and checks whether each segment is in the expected state (on or off).

Installation

git clone [email protected]:NextCenturyMeters/nm-lcd-check.git
cd nm-lcd-check
npm install

How it works

Verification requires three types of images for each device model:

  • Template image — a tight crop of just the LCD screen with all segments off. Used to locate the screen's position in every subsequent photo.
  • All-off image — a full, uncropped photo of the device with all segments off. The template is matched against this image to find the screen's coordinates, which are then applied to test images.
  • Test images — full, uncropped photos of the device in various states to verify against expected segment states.

Workflow

Step 1 — Take your photos

Take a full photo of the device with all segments off (the all-off image), crop a tight version of just the LCD area from it (the template image), and take full photos of the device in the states you want to verify (test images).

Step 2 — Label segments with the pixel picker

The pixel picker is a Python tool that lets you draw rectangles over segments on the LCD and label them. It outputs a JSON file in the correct format to pass directly as pixelData to the verifier.

Requirements: Python 3.9+, with matplotlib, numpy, and opencv-python installed.

cd pixelPicker
python -m venv venv
source venv/bin/activate      # Windows: venv\Scripts\activate
pip install matplotlib numpy opencv-python

Open picker.py and set imagePath to your template image path, then run:

python picker.py

Draw a rectangle over each segment, type a label, and press Enter to save it. Green rectangles are segments expected to be on; regions with little to no pixel activity are automatically classified as expected-blank. Click Complete when done — this writes picked.json.

To visually verify your selections, run placer.py (set imagePath to a debug/cropped image and inputFile to picked.json).

Step 3 — Run verification

const { LCDVerifier } = require('@nextmeters/lcd-check');

const verifier = new LCDVerifier();
const results = await verifier.verify({
  templateImagePath: 'path/to/template.png',
  allOffImagePath:   'path/to/allOff.png',
  tests: [
    {
      imagePath: 'path/to/testImage.png',
      pixelData: require('./picked.json'),
    },
  ],
  debugPath: 'path/to/debugOutput', // optional
});

// results is an array — one entry per test image
results.forEach(result => {
  console.log(result.imagePath, result.passed);
  if (!result.passed) {
    console.log(result.problemRegions); // array of segments that failed
  }
});

Each entry in results has:

  • imagePath — the path of the image that was tested
  • passedtrue if all segments matched expectations
  • problemRegions — array of segments that did not match, each with a problemMessage and the region's coordinates

Debugging

Passing debugPath to verify() writes intermediate images to that directory:

  • allOff.png — the cropped baseline (all segments off)
  • cropped.png — the cropped test image
  • diff.png — pixel diff between baseline and test
  • diff-gray.png — grayscale diff used for segment analysis