이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
how to obtain image boundary of an image?
조회 수: 1 (최근 30일)
이전 댓글 표시
Cesar
2013년 2월 5일
how to obtain image boundary of an image?
댓글 수: 2
Youssef Khmou
2013년 2월 6일
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 .
Cesar
2013년 2월 6일
By example consider an image with 4 birds (bird.tif), and I want to add of of those birds to the same image which now has 5 birds. Let me know if that is clear.
채택된 답변
Image Analyst
2013년 2월 5일
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
Cesar
2013년 2월 5일
I want to perform a boundary operation by which to obtain image boundary on a gray image.
Image Analyst
2013년 2월 5일
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, :);
Cesar
2013년 2월 5일
Thanks. The functions do create and display all 4 boundaries of the image. Can that also be done using only 1 function?
Image Analyst
2013년 2월 5일
Yes, just string them together:
oneBoundary = [yourImage(:,1), yourImage(:,end), yourImage(1,:), yourImage(end,1)];
Cesar
2013년 2월 5일
I got an error using the string: Error using horzcat CAT arguments dimensions are not consistent.
Image Analyst
2013년 2월 5일
편집: Image Analyst
2013년 2월 5일
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)];
Cesar
2013년 2월 5일
Another question. Imagine an image with 4 birds (bird.tif by example), how to add additional bird in the image?
Image Analyst
2013년 2월 5일
Get a mask for the bird, then do
birds5(binaryMask) = singleBirdImage(binaryMask);
to transfer the bird from the singleBirdImage to the birds5 image.
Cesar
2013년 2월 5일
img = imread('bird.tif'); IMG = imshow(img); IMG1 = imellipse(gca,[55 10 120 120]); BW = createMask(IMG1,IMG); Will that create the mask for the bird?
Image Analyst
2013년 2월 5일
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
2013년 2월 6일
Image Analyst
2013년 2월 6일
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
2013년 2월 6일
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
2013년 2월 6일
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
2013년 2월 6일
And exactly how am I supposed to find your images? tinypic.com is a big web site.
Cesar
2013년 2월 6일
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- 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)
아시아 태평양
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)