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
  Equivalent Python code from VBA Mishal0488 1 631 Jul-05-2023, 10:43 AM
Last Post: carecavoador
  Python C++ Template Equivalent deanhystad 7 3,312 May-04-2021, 07:45 PM
Last Post: deanhystad
  Hi Guys, please help me to write SAS macro parameter equivalent code in Python Manohar9589 2 2,536 Jun-14-2020, 05:07 PM
Last Post: Larz60+
  python equivalent to MATLAB xcov chai0404 2 3,816 Apr-02-2020, 10:29 PM
Last Post: chai0404
  Python equivalent of Matlab code kwokmaster 1 3,398 Mar-25-2020, 10:14 PM
Last Post: j.crater
  Convert a mongo db scrip to python equivalent Herath 1 2,163 Aug-20-2019, 02:28 PM
Last Post: fishhook
  SAS Equivalent of Macro variable in Python AI_ML_Neophyte 4 11,522 Mar-29-2019, 08:14 AM
Last Post: FelixS
  Python equivalent to sed [solved] cygnus_X1 2 11,320 Sep-24-2018, 10:13 PM
Last Post: cygnus_X1
  equivalent commands saeed_balk 2 2,611 Sep-23-2018, 05:44 AM
Last Post: saeed_balk
  Python "read -n" equivalent? rhubarbpieguy 8 6,674 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