473,385 Members | 2,015 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to extract detected object using object's bounding box and display it in sub imag

I have detected an object and then draw bounding box using regionprops...I have tried but i am unable to crop the bounding box and display it in another sub image.
Following is the code of drawing Bounding box using regioprops

Expand|Select|Wrap|Line Numbers
  1.  
  2. S = regionprops(BWfinal, 'Area','Eccentricity','Centroid','BoundingBox');
  3.  
  4. All_areas = vertcat(S.Area);
  5.  
  6. [MaxArea, MaxAreaIdx] = (max(All_areas(:)));
  7.  
  8.  
  9. All_BB = vertcat(S.BoundingBox);
  10.  
  11. PotA = find(All_areas==MaxArea);
  12.  
  13.  imshow(g)
  14. hold on
  15.  
  16. for k = 1:numel(PotA)
  17.  
  18. rectangle('Position',All_BB(PotA(k),:),'EdgeColor','y','LineWidth',2)
  19. end
  20.  
  21.  
  22.  
  23.  
Aug 8 '17 #1
0 1448

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: R. Rajesh Jeba Anbiah | last post by:
I could see that it is possible to have hash array using objects like var hash = {"a" : "1", "b" : "2"}; Couldn't still findout how to declare hash array in Array. var arr = new Array("a" : "1",...
1
by: Sergiusz Michalski | last post by:
Hallo! Is it possible to get image using XMLHTTP and display it on WWW ?? All secury lack solutions are needless so ADODB.Stream won't be a right way! Thanks for help! SM.
1
by: Jinlin | last post by:
I am using PropertyGrid to display some attributes, one of them is a key/value pair struct. When you click on the attribute, a standard dialog box will popup that I can edit the values. My...
0
by: **Developer** | last post by:
I know about Shell.ExtractIconEx But suppose I have a .ICO file that has 3 or 4 icons of various sizes in it. I'd like to extract then, determine the sizes and display them. How can I do...
2
by: http://www.visual-basic-data-mining.net/forum | last post by:
I have 3 records in a text file called cvsAcctInfo.txt. I would like to read these three lines and put them into an array which happens to be a defined object. When I do this, it creates an array...
13
by: Andy Baxter | last post by:
Can anyone recommend a good online guide to using objects in javascript? The book I bought (DHTML Utopia) suggests using objects to keep the code clean and stop namespace clashes between different...
3
by: ananth | last post by:
Hi all, i need to clear multiple text box using a single button click how can it be done using objects
19
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I access a property of an object using a string?...
10
by: Jess | last post by:
Hello, If I create a temporary object using a dynamically created object's pointer, then when the temporary object is destroyed, will the dynamically created object be destroyed too? My guess...
3
by: nagar | last post by:
I was thinking about using databinding to display the user settings. I'm not using the .NET 2.0 ApplicationSettings but I'm using a class that contains all the settings. I have a few questions:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.