- dealing with remaining CC after noise removal
- do we re-index the obj so that the indices are an array of continuous numbers?
- this means to re-index each pixel in the matrix, which requires time
- we can use a dict to record the remaining indices in the CC map, which takes space of only 10- elems
- go with dict !!!!
- Matlab boundary detection
- [B,L,N,A] = bwboundaries(BW);
- % B = {obj, holes}
- N = n_obj
- A = [boundaries, r vs. c = enclosing(i_obj_in_B) vs. enclosed(i_hole_in_B)]
Thursday, October 25, 2007
CC detach, filtering
Tuesday, October 23, 2007
top as CC or bottom as CC?
Prerequisite
- For any edges of a CC
- the inner edge (of shorter radius) is indexed as (1), outer (2)
Top:
- Pros
- more direct and intuitive for CC analysis
- no Inf in the data range, and they are really "connected".
- edges are valid depth data
- when calculating depth of the groove bottom, the depth of the top is directly available.
- Cons
- the edges are not the boundaries of the same groove, making the forthcoming groove locating more complex.
- to locate groove(k), we have to get CC(k+1).edge(1) and CC(k).edge(2)
- with another orientation (e.g. 12 o'clock), it might change into CC(k+1).edge(2) and CC(k).edge(1)
Bottom
- Pros
- more direct and intuitive for later polar coord extraction for grooves.
- always CC(k).edge(1), CC(k).edge(2)
- Cons
- the CC analysis is less intuitive, need to combine the sidewall and the bottom as a pseudo-CC.
- no valid depth value on the edge
- when addressing the depth of the bottom, the reference depth of the top should be derived from surrounding area. This require a branched navigation to find adjacent valid area,
- At 10 o'clock, go from 5-10 o'clock for edge(2)
- At 2 o'clock, go from 8-2 o'clock for edge(2)
Saturday, October 20, 2007
Friday, October 19, 2007
rewrite Matlab CC analysis
Description
- Matlab CC analysis assumes that the image can be loaded into memory. But in our case, stitched matrix exceeds the memory limit. We cannot do a CC analysis of the grid using Matlab native function.
What I want
- Trace the groove smoothly across FOVs without hassling at the boundary.
How I can have them
- Mark the areas in the grid as CCs, link all CCs in all frames
- When crossing the boundary of two adjacent frames, find the CC Y in FOV B that is the continuation of the CC X in FOV A
- This can be a round trip, because all CCs are essentially one. So the output of this step is a chain like: Obj 1 in FOV-1, Obj 4 in FOV-2, ....., Obj 3 in FOV-2, Obj 6 in FOV-1.
- Exceptions: a node in this chain can have several FOVs (overlaps). So the chain is actually a tree.
- How to build the tree?
- Global: need a head and top-down
- Pros: conceptually easy.
- Cons: directional, need decision making about the spread direction.
- Local: for each FOV, find its precedents and successors
- Pros:
- Cons: still need to determine which FOVs are precedents / successors, even harder than global approach, because there is no "spreading" at all, so the direction is N/A.
- What will avoid direction decision?
- Angle, with the center coord, we can determine the angles of the entry/exit points.
- Select one of them as a current obj of interest and trace through it, collecting radial distances and depths.
- When I collect radial distances of the target positions, I don't have to deal with boundary again, just go with a label map
- find all pixels with a label "i".
- calculate the radial distances without having to care about the order of these pixels.
- we can sort the pixels in terms of the angular order later.
Any assumptions associated with this workflow and any exceptions
What I need to deal with the exceptions and achieve the original goal
What I have
What I don't have
What I shall do next
Subscribe to:
Comments (Atom)
