Replies: 1 comment 2 replies
-
Could you discuss the nature of the 12-bit camera output? Are the pixels initially packed? https://github.com/JaneliaSciComp/UInt12Arrays.jl You may want to take a look at the JuliaArrays Github organization. For example, |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was suggested to re-post from JuliaDiscourse here, hoping to get a more specific help.
Hello,
In order to avoid the XY-problem I will try to provide a context and a desired result first, and only later some particular questions.
Context: I don't have much experience in Julia and (partially in order to fix that) I am making an application for analysis of the fast camera footage now. The raw files are collections of Tiffs or Tiff-stacks with file size around several GB. Camera captures 3 views of the same object filtered through different spectral bandpass filters. These images are combined side-by-side (via optics) on a single camera sensor. The analysis is based on relation of spectral intensities captured from the object. This implies that 3 ROIs have to be selected from raw footage (displaying the same image captured at different wavelengths), precisely aligned and pixel-wise divided one by another.
Algorithm:
Output: Array{N4f12,3}
Expected output: 3 of view(::Array{N4f12,3})
Output: 3 of Array{Float32,3}. This will be an intermediate result that should be saved, hence the allocation.
Output: 2 of Array{Float32,3}
I was successful implementing a MWE which did allocations at every stage of the process and worked on a rather small test-stack (30 frames). Now the intention is to substitute views where appropriate in order to make it to work with the full size files, (preferably without freezing my laptop 🙃). Ordering was intended to minimize unnecessary allocations and make all the transformations and most importantly, cropping before doing any multiplications or divisions.
Initial naive implementation of (2) was:
However as this the first time working with
view
s in Julia I am not quite sure how I can return a reference to it after iterating? In order to iterate over it and/or append to it is should be declared in some way, but I don't quite get how does one declare an empty view? 🫠This is what I am trying to do:
I am not insisting on that particular implementation and will welcome any comment on the general approach as well.
Thanks in advance and all the best,
Igor
Beta Was this translation helpful? Give feedback.
All reactions