Python Forum
Equivalent of 'bwareafilt' for Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Equivalent of 'bwareafilt' for Python
#1
What is an equivalent to the MATLAB function bwareafilt in Python? I need an output binary image that only contains the largest connected area of pixels.
Reply
#2
I'm not familiar with MatLab but it sounds like a blob analysis. I didn't find anything in PIL (or PILLOW) that does that although you could probably use its functions to make something similar.

Looks like there are similar tools in OpenCV you could use though:
https://stackoverflow.com/questions/2348...-in-opencv
https://makehardware.com/2016/05/19/blob...nd-opencv/
"So, brave knights, if you do doubt your courage or your strength, come no further, for death awaits you all with nasty, big, pointy teeth!" - Tim the Enchanter
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  set -x shell equivalent of python, possible/available? ggpf900 1 420 Jan-25-2025, 08:01 PM
Last Post: Gribouillis
  Equivalent Python code from VBA Mishal0488 4 2,479 May-02-2024, 10:17 PM
Last Post: DeaD_EyE
  Python C++ Template Equivalent deanhystad 7 5,548 May-04-2021, 07:45 PM
Last Post: deanhystad
  python equivalent to MATLAB xcov chai0404 2 4,821 Apr-02-2020, 10:29 PM
Last Post: chai0404
  Python equivalent of Matlab code kwokmaster 1 4,304 Mar-25-2020, 10:14 PM
Last Post: j.crater
  Convert a mongo db scrip to python equivalent Herath 1 2,844 Aug-20-2019, 02:28 PM
Last Post: fishhook
  SAS Equivalent of Macro variable in Python AI_ML_Neophyte 4 13,907 Mar-29-2019, 08:14 AM
Last Post: FelixS
  Python equivalent to sed [solved] cygnus_X1 2 12,784 Sep-24-2018, 10:13 PM
Last Post: cygnus_X1
  equivalent commands saeed_balk 2 3,464 Sep-23-2018, 05:44 AM
Last Post: saeed_balk
  Python "read -n" equivalent? rhubarbpieguy 8 8,511 Jan-24-2017, 12:51 PM
Last Post: rhubarbpieguy

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020