CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-sharp

High performance Node.js image processing library for resizing JPEG, PNG, WebP, GIF, AVIF and TIFF images

80

1.01x
Overview
Eval results
Files

task.mdevals/scenario-7/

Medical Image Enhancement Tool

A command-line tool for enhancing the visibility of details in medical images using adaptive histogram equalization techniques.

Capabilities

Process medical images with adaptive contrast enhancement

  • Reads a grayscale medical image from disk and applies adaptive histogram equalization to enhance local details @test
  • Enhances images with controllable window size to balance local and global contrast @test
  • Limits contrast amplification to prevent over-enhancement in noisy regions @test
  • Saves the enhanced image to the specified output path @test

Implementation

@generates

API

/**
 * Enhances a medical image using adaptive histogram equalization.
 *
 * @param {string} inputPath - Path to the input image file
 * @param {string} outputPath - Path where the enhanced image will be saved
 * @param {Object} options - Enhancement options
 * @param {number} options.width - Window width for local histogram (default: 3)
 * @param {number} options.maxSlope - Maximum contrast amplification limit (default: 3)
 * @returns {Promise<void>}
 */
async function enhanceImage(inputPath, outputPath, options = {});

module.exports = { enhanceImage };

Dependencies { .dependencies }

sharp { .dependency }

Provides high-performance image processing with adaptive histogram equalization support.

Install with Tessl CLI

npx tessl i tessl/npm-sharp

tile.json