NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
mwenger
Posts: 7
0 Kudos

Convert bmp to i16 grayscale binary and resize resolution

Just curious if anyone has attempted this or something similar.

 

Basically what I have is some of the lab workers were I am at save a screenings of an analysis tool in a Bitmap format (MS Paint) and that screenings contains important information that I would like to extract.  usually the resolution is around 1000-1200 x 1000x1200 pixels

I also have another software program that analyzes i16 Binary images that are 124 x124 pixels. So I would need almost a 90% reduction.

 

My thought is if I can get the bmp into a binary format and resize it then my analysis tool would take care of the rest.  As well I'll combine these analysis tools into one package and that would make a lot of people happy.

 

Yes I know 124 x 124 is not much but the amount of information I need to graph should be just fine.

Active Participant
mfitzsimons
Posts: 659
0 Kudos

Re: Convert bmp to i16 grayscale binary and resize resolution

I don't see a pratical way to reduce a 1200x1200 resolution image to 124x124.  What you can do is take multiple areas of your 1200x1200 and chunk out 124x124s and run it through your image processor.If you run enough chunks of 124x124 your can evaluate the results and make a determination.  

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 10.0, LVOOP, GOOP, TestStand, DAQ, and Vison
Member
mwenger
Posts: 7
0 Kudos

Re: Convert bmp to i16 grayscale binary and resize resolution

I already figured it out.  I first converted the bitmap to an array (easy stuff).  Then, taking my Original x and y resolutions divided by 124 and passed it through a double for loop to process point by point and pull out ever ((x/y resolution)/124) point .  ...The I16 grayscale was maybe some misinterpretation.  I just thought originally it would have been nice to have a direct conversion from the Bitmap RGB to i16 Grayscale seems in the version I have there is no option available for that and I just had to use some manipulation.

 

The analysis I am building requires me to reduce the image size.  loosing about 90% of the information was not going to affect the type of analysis I was performing.  In fact I could have gone smaller if necessary. 

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page