TransWikia.com

Extracting unique values from array

Mathematica Asked on June 18, 2021

I performed MorphologicalComponents on an image, and from there used SelectComponents to filter out my desired components. Is there a way to extract out the unique values from the entire array? i.e. get a list of the labelled component values

I tried using DeleteDuplicates, but that only works on a list, and also tried using Select with a search criteria #>0, but that didn’t work out as well.

Thank you!

One Answer

The solution was given by Henrik:

DeleteDuplicates@*Flatten@array. 

Thank you!

Correct answer by Gnaprs on June 18, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP