Classical Machine Learning

Put the tray image on a known scale

BOTIE

Divide every pixel by the supplied maximum. Preserve the image's two-dimensional arrangement.
Ready to test
0 passed · 0 failed · 2 not run

An empty floor. Start with the information your machine needs.

Received result

Your answer will arrive here.

Examples, experiments and workspace controls
Live values

Connect a tool's inputs to see what it produces. You can try a branch before connecting it to Result.

Try your own inputs

Use a copy of the example to try your own data. Keep the problem's assumptions in mind, and predict the effect of a change before checking the output. You can also add another branch to compare two ways of doing the calculation.

Start at an output arrow, then click or drag to an input. Drag empty space to pan. Delete removes a selection. Ctrl/Cmd+Z undoes a change.
Context for this challenge

Divide every pixel by the supplied maximum. Preserve the image's two-dimensional arrangement.

The tray photograph is a grid of stored brightness values. Botie needs a known intensity scale without losing where each pixel belongs.

Divide every image entry by the supplied format maximum and keep the two-dimensional layout.

Examples and results
Grayscale tray image
102010
2022030
1020020
Maximum intensity of this format
255
Required result
0.03920.07840.0392
0.07840.86270.1176
0.03920.78430.0784
Grayscale tray image
00
Maximum intensity of this format
255
Required result
00
Try a fresh construction

This clears this draft, including its undo history. Earlier successful attempts stay recorded. Build again without opening hints to record an independent attempt.

Stuck? Inspect a worked construction

The tools below form one possible solution. You can assemble it, follow its signals, and undo that change to return to your own construction.

Assumptions and test precision

The format maximum must be positive. These examples rescale stored intensity values; they do not remove lighting differences. Numerical tests allow a difference of 0.001. Lists and structures must also have the right shape.

A ten-bit camera replaces the earlier format

This check uses the pieces from “Rescale brightness while retaining pixel positions”.

BOTIE

The new camera stores intensities up to 1023. Predict the rescaled image using that format maximum, preserving the pixel positions.
Grayscale tray image
0512
7681023
Maximum intensity of this format
1023

Use a number, text, or an array matching the requested result. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.

Build a construction in the workspace above first. This case will test those pieces.

Why should a uniformly dark photograph remain dark after this conversion, and why is dividing by its observed maximum a different operation?

Distinguish format rescaling from image-dependent contrast changes before comparing photographs.

The format maximum must be positive. These examples rescale stored intensity values; they do not remove lighting differences.

Work through the Python challenges →
Continue the courseImage Thresholding →
← Markov Chains