future.graph.merge_hierarchical
bricklemacho at gmail.com
bricklemacho at gmail.com
Sat Sep 19 16:54:40 EDT 2015
Hi Vighnesh,
I am struggling with both Python and the graph stuff, hope you can help
me. I have taken discussion off list.
I am using your idea in your blog: Hierarchical Merging In Action.
Similar to your seg_list[] concept, I plan to store a copy of the merged
regions in a list. The best place appears to be at bottom of the while
loop in merge_hierarchical (about line 130 in graph_merge.py). Default
plan is to duplicate Lines 132-136 of graph_merge.py to create a label map:
label_map = np.arange(labels.max() + 1)
for ix, (n, d) in enumerate(rag.nodes_iter(data=True)):
for label in d['labels']:
label_map[label] = ix
Seems bit of an overkill to traverse the entire graph each time. Is
there any other way you can suggest? All I need is a label map that
consists of two labels, one being the merged region and everything else
grouped/labeled as another region.
Any help appreciated.
Regards,
Michael.
--
On 19/09/2015 11:51 am, Vighnesh Birodkar wrote:
> Hello
>
> I am sorry, I was mistaken, there is no way of getting the merge
> sequence right now without changing the source.
>
> Thanks
>
>
> On Fri, Sep 18, 2015 at 9:46 PM, bricklemacho at gmail.com
> <mailto:bricklemacho at gmail.com> <bricklemacho at gmail.com
> <mailto:bricklemacho at gmail.com>> wrote:
>
> Hi,
>
> My graph theory is pretty weak so I may be missing something
> obvious. Can you elaborate a little more on your suggestion below.
>
> Are you saying the setting in_place=False, will the graph then
> retain a copy of the intermediate steps? If so how do I access
> these intermediate steps?
>
> Playing around with RAG Merging example (from the skimage
> gallery). If set rag_copy=True, I will have the starting graph,
> and can use the labels returned from merge_hierarchical to see the
> result of final merge, but I can't see way to review the
> intermediate steps.
>
> Any help appreciated,
>
> Michael.
> --
>
> On 18/09/2015 10:30 pm, Vighnesh Birodkar wrote:
>>
>> Hi
>>
>> Using in _ place = False, couldn't you get the entire sequence of
>> merging from the root node ?
>>
>> On 17 Sep 2015 12:59, "bricklemacho at gmail.com
>> <mailto:bricklemacho at gmail.com>" <bricklemacho at gmail.com
>> <mailto:bricklemacho at gmail.com>> wrote:
>>
>> Setting the threshold to infinity will merge everything, but
>> in what order are the nodes merged?
>>
>> Assuming setting threshold to infinity works, I still need
>> to save a copy of each merge. Any suggestions?
>>
>> Regards,
>>
>> Michael.
>> --
>>
>> On 17/09/2015 11:23 pm, Vighnesh Birodkar wrote:
>>
>> Hello
>>
>> Rather than creating an alternative method, you could
>> always set the threshold to infinity. Won't that work in
>> your case ?
>>
>> Thanks
>> Vighnesh
>>
>>
>> --
>> You received this message because you are subscribed to a
>> topic in the Google Groups "scikit-image" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/scikit-image/rnsVLQ-tFJM/unsubscribe.
>> To unsubscribe from this group and all its topics, send an
>> email to scikit-image+unsubscribe at googlegroups.com
>> <mailto:scikit-image%2Bunsubscribe at googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the
>> Google Groups "scikit-image" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to scikit-image+unsubscribe at googlegroups.com
>> <mailto:scikit-image+unsubscribe at googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in
> the Google Groups "scikit-image" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/scikit-image/rnsVLQ-tFJM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email
> to scikit-image+unsubscribe at googlegroups.com
> <mailto:scikit-image+unsubscribe at googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "scikit-image" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to scikit-image+unsubscribe at googlegroups.com
> <mailto:scikit-image+unsubscribe at googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20150920/55069071/attachment.html>
More information about the scikit-image
mailing list