Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

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.

0 Kudos
Message 1 of 3
(3,053 Views)

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 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 2 of 3
(3,042 Views)

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. 

0 Kudos
Message 3 of 3
(3,039 Views)