Classical Machine Learning
Put the tray image on a known scale
BOTIE
Examples, experiments and workspace controls
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.
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
10 20 10 20 220 30 10 200 20 - Maximum intensity of this format
255
- Required result
0.0392 0.0784 0.0392 0.0784 0.8627 0.1176 0.0392 0.7843 0.0784
- Grayscale tray image
0 0 - Maximum intensity of this format
255
- Required result
0 0
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
- Grayscale tray image
0 512 768 1023 - 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 →