03-07-2016 03:50 AM
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.
03-07-2016 08:52 AM - edited 03-07-2016 08:53 AM
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.
Bob Schor
03-08-2016 06:22 AM
@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?
03-08-2016 06:33 AM
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
03-08-2016 06:37 AM
sir..please be calm.i amvery thankfull to you people for helping me.i am now putting my vi
03-08-2016 06:44 AM
sir "image 3 "is my template image(ROI) which i want to crop on "original image".
03-08-2016 06:52 AM
03-08-2016 06:57 AM
sorry sir but i cant understand what is your answer?what i have to do?
03-08-2016 07:05 AM - edited 03-08-2016 07:09 AM
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
03-08-2016 07:08 AM