You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
how to obtain image boundary of an image?
1 view (last 30 days)
Show older comments
how to obtain image boundary of an image?
2 Comments
Youssef Khmou
on 6 Feb 2013
Hi Cesar, you have to specify your problem, give an example with per example "circuit.tif" so everyone can work on it instead of image taken from web .
Accepted Answer
Image Analyst
on 5 Feb 2013
You haven't explained this well enough to answer. The answer could be to use bwperim(), or bwboundaries(), or just to take the first and last row and first and last column. Are you going to explain further what you want?
26 Comments
Image Analyst
on 5 Feb 2013
OK, bwboundaries() and bwperim() only work on binary images. So, just do something like this:
leftBoundary = yourImage(:, 1);
rightBoundary = yourImage(:, end);
topBoundary = yourImage(1, :);
bottomBoundary = yourImage(end, :);
Image Analyst
on 5 Feb 2013
Yes, just string them together:
oneBoundary = [yourImage(:,1), yourImage(:,end), yourImage(1,:), yourImage(end,1)];
Image Analyst
on 5 Feb 2013
Edited: Image Analyst
on 5 Feb 2013
You need to transpose two of them, because two are row vectors and two are column vectors. Use ' to transpose.
oneBoundary = [yourImage(:,1)', yourImage(:,end)', yourImage(1,:), yourImage(end,1)];
Image Analyst
on 5 Feb 2013
Get a mask for the bird, then do
birds5(binaryMask) = singleBirdImage(binaryMask);
to transfer the bird from the singleBirdImage to the birds5 image.
Image Analyst
on 5 Feb 2013
Why don't you upload your images of the 4 birds? Where does your single bird come from? A separate image, or is it just one of the 4 that you'd like to copy somewhere else in the image? If you upload your images, then we can cut to the chase and not go back and forth lots of times.
Image Analyst
on 6 Feb 2013
Image Analyst
on 6 Feb 2013
What image? You didn't tell me the location of any image. Please review your postings from my point of view. Does anyone have enough information to help you?
Cesar
on 6 Feb 2013
Why don't you upload your images of the 4 birds? Where does your single bird come from? A separate image, or is it just one of the 4 that you'd like to copy somewhere else in the image? If you upload your images, then we can cut to the chase and not go back and forth lots of times.
Cesar
on 6 Feb 2013
Imagine an image with 4 objects, how to add an additional object in the image? That was my question. I uploaded an image with 4 objects at http://www.tinypic.com.
Image Analyst
on 6 Feb 2013
And exactly how am I supposed to find your images? tinypic.com is a big web site.
Image Analyst
on 6 Feb 2013
You don't need to send it. Just tell me its URL so we can find it.
More Answers (0)
See Also
Categories
Find more on Computer Vision with Simulink in Help Center and File Exchange
Tags
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)