現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
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 件)
参考
カテゴリ
Help Center および File Exchange で Computer Vision with Simulink についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の 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 (한국어)