Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to enlarge binary images?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have problem with letter matching.
for example:
a 18*13 image "A"
a 34*21 image "A"
a 23*14 image "A"
to tell if they are the same letter, I need to enlarge them to 64*64 and then compare them.
any one know how to enlarge these images?

Many thanks,
Jinfu
 
Hi Jinfu,

I don't know if this is what you wanted but perhaps you could try the method getScaledInstance() found in the class Image?

Try doing:-

Image finalFirstImage = firstAImage.getScaledInstance(64,64,Image.SCALE_DEFAULT);

Image finalSecondImage = secondAImage.getScaledInstance(64,64,Image.SCALE_DEFAULT);

Image finalThirdImage = thirdAImage.getScaledInstance(64,64,Image.SCALE_DEFAULT);

where firstAImage, secondAImage and thirdAImage would be your 3 images of "A" and after that, compare the scaled images: finalFirstImage, finalSecondImage and finalThirdImage

Hope this helps,
Leon If you need additional help, you can email to me at zaoliang@hotmail.com I don't guaranty that I will be able to solve your problems but I will try my best :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top