Convert a binary image to rgb [closed] - image

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have RGB image that I converted to binary to do some processing(I'm working on watermarking) and in extraction watermaek I want to reconvert it back to its original color RGB, is it possible? I did some researchs on the internet but unfortunately I couldn't find a good answer. thank you in advance.

Binarization is a lossy opertation that loses information. There is no way to hallucinate this information back, unless you use the additional external input, e.g. the original image.
You can always use your binary image as a mask for example for operating on the original RGB image.
If you want an RGB formatted binary image, just copy the binary image into the three RGB channel. You will need to decide what RGB the binary non-zero value will be converted to, e.g. 1, 255, max-val etc.

Related

How to detect QR codes from images in Go? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed yesterday.
Improve this question
How can I detect QR codes when processing the pixels of an image?
The image might be pixelated (low-fidelity), noisy (missing or extra pixels in a line), blurry (antialiasing), or be at an angle (image skew). Simply looping through the pixels seems like it would require some sort of line detection and then you could figure out a good calculate of the number of expected blocks between the three (or four) different corners.
You will need to use an image processing library to detect QRCodes. I’ve used go-zxing in the past which is 100% native go.
You will need to be familiar with the go image package that’s part of the standard library.

MATLAB image processing - How can I find the building footprint from an aerial image [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I got this aerial image of a warehouse from Google Map, and I'd like to analyze the characteristics of the building inside the image. How can I find the approximate building footprint?
I learned some functions for matlab image processing. But I'm still a newbie for image processing. I'll be very appreciated if anyone can help me.
Or is it easier to figure out the area using the roadmap image below?
Import the roadmap image in Matlab, convert in in an 8bit greyscale image and use the following binarization.
BW = imbinarize(I,'adaptive','Sensitivity',0.68);
figure, imshow(BW,[0,1])
From Here you can either use regionprops (link) or extract lines using a Hough transform.

How to combine two binary image? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have a final project in which I have to combine two images from optic disk segmentation and optic cup segmentation on binary images. I can't combine both images.
i wish anyone can help me. thankyou
If the images are binary, you may want to take the logical AND to get the pixels that are white in both of them.
im3=im1 & im2;
Assuming that the two images have the same size and the values are in {0,1}, I think
result = image1 .* image2;
would be the most natural choice, yielding a result like this:

How to jumble an image? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
If the input is an image, my output should be a scrambled or jumbled image of the original image. There isn't a need to divide the image into sub-blocks and scramble those regions individually. You can scramble the entire image in one operation. How can I achieve this in MATLAB?
If you what you mean by "scrambled" is by randomly re-arranging pixels in your image, you can create a random permutation vector that is as long as the total number of pixels in your image, reshape this so that it's the same size as the image, then use this to index into it. Specifically, use randperm to help you do this. As an example, let's use cameraman.tif that's part of MATLAB's system path. Do something like this:
im = imread('cameraman.tif');
vec = randperm(numel(im));
vec = reshape(vec, size(im));
out = im(vec);
If you want to undo the scrambling, vec contains the column-major indices of where the pixels need to be remapped to in the original image. Therefore, simply allocate a blank image, then use vec to index into this blank image and copy out back. What this will do is that it will take the positions in the scrambled image, and copy them back in the locations that are indexed by vec. This basically undoes the scrambling that we did before. Therefore:
reconstruct = zeros(size(im), class(im));
reconstruct(vec) = out;
This is the original image:
This is what the scrambled image looks like:
Certainly looks noisy!... and scrambled... at least I think so. By doing the reconstruction, this is what the image looks like:
The key to scrambling and unscrambling the image is to have that vector generated by randperm. If you don't have this, then there's no way for you to reconstruct the original image.
Good luck!

Extract pattern from image [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Is there any way to figure out the pattern from an image?
I need it so that I could create a smaller image from it to repeat so that I could have a background pattern.
p.s: Don't mind the 2 different colors, I just need the almost transparent lines pattern figured out.
Here's a white and black repeating version of the pattern.
What did I do?
Copied some of the top portion of your image
Pasted it into a mask on a solid white layer
Added a photo under the layer to simulate the finished result
Inverted the mask
Adjusted the levels on the mask until I got an effect that was similar to your example
Cropped the image down to one pattern so it would be repeatable
Hit CMD CNTRL SHIFT S to save for web and saved it as a 24-bit PNG
Then inverted the white layer to black and saved for web again.
Does that seem to be what you were looking for?
I would use levels to get it to almost black & white.
Use sliders to get the lightest grey as light as possible
use the highlight/Shadow eyedropers within the levels palette to get it even closer
Use threshold to get it the rest of the way.
Take a look at the image below to see if what I described is what you are wanting.

Resources