3 ms·
Yeah, if you have an array of pixels or hypercubes, you can think of it as a 1D array and leave the details of what's contained below your barrier of abstractio
by maxbond 3y ago
Yeah, if you have an array of pixels or hypercubes, you can think of it as a 1D array and leave the details of what's contained below your barrier of abstraction. And that's a useful mental model much of the time.
But I would still argue that an array of pixels doesn't represent a 1D image. If a 2D image associates areas with color or intensity values, a 1D image would associate intervals with color or intensity values (since intervals are the measure of 1D space which is analogous to areas in 2D space). In my mind, those are different data structures, but the difference is pretty nuanced and I would understand if people felt I was splitting hairs.
Given the question, "what's a 1D image?" I'd argue this is the more complete answer. But if we were to ask that question in the context of a real world problem, yours is likely to be the more useful answer.