LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

i want to crop the rectangle shape from an image?what is the method for it?

sir i am attaching my original image.and the template image also.temlate image is the rectangle only.that i extracted from original image,now i want to crop it on original image so i get number plate using coordinates.

Download All
0 Kudos
Message 11 of 36
(3,435 Views)

If you have the actual Image, instead of trying to calculate the coordinates of the "area of the picture of interest to you", called by some the "Region of Interest", or ROI, you could use LabVIEW Vision's ROI Tool to first select what you want, then use the code I showed you to extract and display it.  Here's a Snippet of some code I just threw together.  I did "cheat" -- I ran this when just the first two Functions had been written and the Car Image was displayed, at which point I used the Rectangle tool to lay down an ROI around the License Plate.  I then added the Property Node, the last two functions, and the second License Image control, and ran the code again.  Guess what I got?  Note the ROI in Car Image is shown by the Green Rectangle.

Extract License.png

Car Image.pngLicense Image.png

Bob Schor

 

 

0 Kudos
Message 12 of 36
(3,399 Views)

@bob sir.

sir i very well understood your last post and also i done the vi.but my case is little different.

the whole template image is roi itself.so i dont need to draw any roi.i want to just crop that template image in original image.how it is possible? 

0 Kudos
Message 13 of 36
(3,359 Views)

The only people posting code here are the people who are trying to help you.  Post your VIs.  If you have only one or two, just attach the VIs (do not attach .jpgs of them) to your Reply.  If you have more, put them in a folder, compress the folder, and attach the resulting .ZIP file.

 

I don't understand what you are trying to do.  If you already have the ROI in an Image, why not just use that Image?  It sounds to me like (as Paul Newman famously said) "What we have here is a failure to communicate".  You have a very clear idea of what you want to do, some of us (such as I) think we know what you mean and explain how to do what we think you want to do, but we're wrong, and you aren't helping by showing us what you mean.  Very frustrating for those of us trying to help ...

 

Bob Schor

0 Kudos
Message 14 of 36
(3,350 Views)

sir..please be calm.i amvery thankfull to you people for helping me.i am now putting my vi

0 Kudos
Message 15 of 36
(3,338 Views)

sir "image 3 "is my template image(ROI) which i want to crop on "original image".

0 Kudos
Message 16 of 36
(3,330 Views)
sagar1511
I think I answered your question before why you do not do that ?!!
0 Kudos
Message 17 of 36
(3,324 Views)

sorry sir but i cant understand what  is your answer?what i have to do?

0 Kudos
Message 18 of 36
(3,321 Views)

if your template size is your Dimension to cut use image information vi to find x and y
then make rectangle array like 0,0,x,y after that use rectangle to ROI vi and then use Extract vi
easy peasy( do not forget rectangle to ROI need 5 vlaue lst one is angle wire 0 value for this one

0 Kudos
Message 19 of 36
(3,312 Views)
do you need any sample vi?
0 Kudos
Message 20 of 36
(3,305 Views)