title: Group closer white pixels together and draw a rectangle around them in OpenCV
body: <p>I want to group these white pixels that are closer to each other and draw a rectangle around them in OpenCV using C++.</p>
  
  <p>Original Image:</p>
  
  <p><img src="https://i.stack.imgur.com/KuD9y.jpg" alt=""></p>
  
  <p>Expected result:</p>
  
  <p><img src="https://i.stack.imgur.com/BkM5O.jpg" alt=""></p>
  
  <p>I am new to OpenCV. Any help would be deeply appreciated.</p>