Closed jacksoncalvert closed 3 years ago
The most efficient would be to use channelview
which you can check out here https://juliaimages.org/ImageCore.jl/v0.0.4/views.html
The most efficient would be to use
channelview
which you can check out here https://juliaimages.org/ImageCore.jl/v0.0.4/views.html
Would I think just have to vec(rawview(channelview(image)))?
vec
might be unnecessary here because we could do linear indexing in Julia: A[16]
for size(A) == (4, 4)
An alternative to this is reinterpret
:
julia> using ImageCore, ImageDistances, TestImages
julia> img = testimage("camera");
julia> img_raw = reinterpret(UInt8, img);
julia> euclidean(rawview(channelview(img)), img_raw)
0.0
Hi All, Just wondering if anybody knows how you could convert an image back into the {UInt8,1} form that data can come in as.
When Im loading an image, I load as
to get it to an rbg format. Id like to get it back to the data format with a "reverse buffer" of some kind.
Cheers