Questions tagged [binary-image]

Used for questions concerning images of two colors (usually black and white). Such images are common in object detection, edge detection, object counting etc.

A binary image is a digital image that has only two possible values for each pixel. Typically, the two colors used for a binary image are black and white, though any two colors can be used. The color used for the object(s) in the image is the foreground color while the rest of the image is the background color.

131 questions
1
vote
1 answer

Show and download binary files using HTML and javascript

I have been trying to display and download a binary (octet-stream) file that i got from an API's response. I tried converting the file to base64 and displaying it in href and in an iframe, and showing the file directly with its MINE TYPE…
AbdallahJg
  • 69
  • 7
1
vote
0 answers

How to trace boundary of multiple objects manually in binary image using python?

I want to trace the boundary of an object manually using python in binary images without using OpenCV. I am done with one object but I want to trace multiple objects in an image without using OpenCV findContours. original image : output image : I…
Ankit Lad
  • 369
  • 3
  • 5
1
vote
1 answer

How to save bi-level image to file in julia?

Objective: To save image in bi-level format as demonstrated at https://memorynotfound.com/convert-image-black-white-java/ Code: using Images, ImageView; function save_as_binary_image(img_path::String, threshold::Float16) img_binary =…
AVA
  • 2,474
  • 2
  • 26
  • 41
1
vote
1 answer

Is it possible to use templateMatch with binary images? I have an error

Is it possible to templateMatch binary images? I've tried it and nothing helps. I always get an error : cv2.error: OpenCV(3.4.5) C:\projects\opencv-python\opencv\modules\imgproc\src\templmatch.cpp:1107: error: (-215:Assertion failed) (depth ==…
1
vote
1 answer

Crop the specific color region and remove the noisy regions (Python+OpenCV)

I have a problem while getting a binary image from colored images. cv2.inRange() function is used to get mask of an image (simillar with thresholding) and I want to delete unnecessary parts, minimizing erosion of mask images. The biggest problem is…
YYK
  • 123
  • 3
  • 13
1
vote
1 answer

How to separate very close characters in binary image for OCR in matlab?

I made a basic OCR system in Matlab using correlation. (It's not a professional project, only as an exercise and I am not using the ocr() function of Matlab). My code is working almost correctly for clean text images. But if I make the job a little…
1
vote
2 answers

How to compare two 2D arrays of different sizes in C++?

I am trying to implement a binary image matching algorithm. And I need to generate the C matrix given below. Given a small pattern image A, I need to match it to large image row-by-row and column-by-column, to find the location where that pattern…
1
vote
1 answer

What is the easiest way on a binary image to check, if two pixels are connected? (In Matlab)

Consider this binary image: 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 I am looking for a function with two coordinates as parameters, and a boolean return value, which states, if the two pixels are connected (by 4- or 8-connectivity), like…
1
vote
1 answer

Remove noise in BW image

I used MATLAB to generate this image (using bwareaopen). In the middle I have a 2D ellipsoid. How can I clear all the "noise" surrounding of it and get a clear ellipsoid? original image
elyraz
  • 473
  • 5
  • 18
1
vote
2 answers

How to denoise and extract ROI of binarised animal footprint images

I am currently working on an animal identification using footprint recognition project. My main task is to process an animal footprint taken from natural substrate and identify the animal the footprint belongs to. The first step is to preprocess the…
user6913557
1
vote
1 answer

Python: Binary image segmentation

Is there a easy way to implement the segmentation of a binary image in python? My 2d-"images" are numpy arrays. The used values are 1.0 and 0.0. I would require a list of all objects with the value 1.0. Every black pixel is a pixel of an object. An…
Kevin Meier
  • 2,339
  • 3
  • 25
  • 52
1
vote
1 answer

Distance transform `bwdist` output is completely black

Why is the bwdist and imhmin image completely black? When I check the the two matrices in the workspace, the values seem fine. You can run this code in Matlab to check it out. The expected result is a grayscale image where the centre of each…
1
vote
1 answer

Python: Get edges from multiple (>400) binary images fast

I basically have multiple binary images, each containing one connected component. These connected components were retrieved from an image, meaning that if all connected components were to be drawn into a single image file, there would be no empty…
1
vote
1 answer

Find the lowest white pixel

I have this binary image. How do i find the coordinate of the lowest white pixel?
1
vote
2 answers

Object detection in binary image

This task comes from tracking object on a steady background. So far I was able to remove the background and obtain binary masks like this: I need to get bounding rectangle of the toy without the cord attached to it (on some frames it's quite…
1 2
3
8 9