I'm wondering how to separate the barcode from background itself, and I have tried some different to remove the unwanted object but cannot remove fully , anybody has an idea!
But I need to do this with many images, so I can't change the value each time :((( that's why I asked for automated method to determine this threshold !