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.

108 questions
4
votes
2 answers

How to identify holes connected by lines in binary graph

I have picked up a code segement from the top voted author's answer from this question: https://answers.opencv.org/question/9863/fill-holes-of-a-binary-image/ Refomatted it as: cv::Mat image = cv::imread("image.jpg", 0); cv::Mat…
Kevin
  • 6,297
  • 16
  • 55
  • 100
3
votes
1 answer

Convert binary image data to image and display in HTML

I'm working with Musicbrainsngs - the Python lib for Musicbrainz API. Making a request for some album artwork. import musicbrainzngs as mb release_group_ID = '5c14fd50-a2f1-3672-9537-b0dad91bea2f' artwork =…
Will
  • 139
  • 2
  • 12
3
votes
1 answer

Curve Fitting in a binary image, MATLAB

I have this Binary image bw: edges of an object to carry out some measurements. But firstly I have to do curve fitting for both edges. The result should be two smooth curves representing edges. I have the indices for each edge but I can not…
3
votes
4 answers

How can I put margins in an image?

I have a binary image of 18x18 pixels and I want to put margins around this image with the purpose of obtaining an image 20x20 pixels. The image is binary and it can be represented by a matrix of 1s and 0s. The 0 pixels are in black colour and the…
user5380136
3
votes
1 answer

OpenCV Save a Mat as Binary (1-bit depth) TIFF

Suppose we have a Mat after applying the OpenCv's Imgproc.adaptiveThreshold: Mat srcImage = ...; Mat binaryImage = new Mat(); Imgproc.adaptiveThreshold(srcImage, binaryImage, 255, Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C, …
Alexander Abakumov
  • 10,817
  • 10
  • 71
  • 111
2
votes
1 answer

How to remove small regions connected by a few pixels from the main region of a binary image?

I have the following image which I have obtained after a segmentation process. Which function or algorithm should I use to remove the small regions (marked by red circles) that are connected to the main segmented region by a very small number of…
2
votes
0 answers

Remove connected objects from binary image

I have a binary skeletonized image with many blobs in the form of vertical lines, most of them are straight and some of them are intersecting each other. I want to remove all those blobs which are intersecting each other. Is there any way? I have…
SAIP
  • 89
  • 4
2
votes
1 answer

OpenCV--how to get better hand contour from low quality gray image?

I need to get contour from hand image, usually I process image with 4 steps: get raw RGB gray image from 3 channels to 1 channel: cvtColor(sourceGrayImage, sourceGrayImage, COLOR_BGR2GRAY); use Gaussian blur to filter gray…
2
votes
1 answer

How do I save the XY coordinates of a Binary Image in R?

I am trying to save the XY coordinates of a binary image in R similarly to the save "Save XY Coordinates" function in ImageJ. I've looked through several image analysis packages available for R, but haven't yet figured out how to accomplish this.
2
votes
1 answer

Not able to display actual grayscale image using EBImage package in R

I am new to image processing in R. To start with, I am using the EBImage R package for this. I have a 260 by 134 Matrix which I converted to an image using > image1 <- as.Image(matrix1) And, here is the image object summary > image1 colorMode …
novicegeek
  • 765
  • 2
  • 9
  • 26
2
votes
5 answers

How to decrease background noise in binary image

Here is an example of binary images, i.e. as input we have an imageByteArray with 2 possible values: 0 and 255. Example1: Example2: The image contains some document edge on a background. The task is to remove, decrease amount of background pixels…
2
votes
2 answers

Element-wise binary value concatenation of two matrices

Element by element, I want to concatenate binary values from different matrices to one matrix. For example, |1 0 0| |0 1 0| |10 01 00| |0 1 1| |1 1 0| = |01 11 10| |1 0 1| |0 0 1| |10 00 11| How can this be done?
Michael
  • 33
  • 7
2
votes
2 answers

Remove unwanted white pixels for plate segmentation Matlab

The spatial resolution images that i will be using in this project is 1000x563. My aim in this step is to remove all unwanted white pixel but not the number plate so I could segment the plate accurately. But the problem is I could not remove those…
2
votes
2 answers

comparing two Binary images in opencv

I have two binary images of hand which are almost same.How should I compare them to know whether they represent almost same shape or not.I have tried finding euclidean distance between two images but its not giving correct answer if the image is…
1
vote
1 answer

Raw Binary Data for Microsoft Cognitive Service API

For the Microsoft Azure Cognitive Services API, the image needs to be passed in this format Input passed within the POST body. Supported input methods: raw image binary. So, I was very lost on how to convert the image the user is uploading into that…
1
2 3 4 5 6 7 8