Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Rotation not being applied to CWIMAQImage

I have a imaging system that's been running reliably for several years.  Using a simple GrabImage function, I save the image to disk and it's done.  The scientists I'm gathering the images for now are asking for some transformation of the images, to get them in an upright view.  So I added the     CWIMAQVision1.Symmetry myImage, myImage, cwimaqSymmetryVertical 

and the CWIMAQVision1.Rotate2 myImage, myImage, 90  to the image before saving.  The symmetry works fine, but the rotation is never applied.  I've tried it in a few different ways from attempting the rotation first, last, pausing between the two, only performing the rotation, copying into another CWIMAQVision, nothing seems to work.  If neither image manipulation worked, I'd say it was me, but the fact that the symmetry works and the rotation doesn't lends me to believe otherwise.  I hope it's me, though.  It's an easier fix!

Here's the snippet of code

 

 

    Dim HistogramReport As New CWIMAQHistogramReport
    frm17CImagerRunScreenHiRes.CWIMAQVision1.Histogram2 myImage, HistogramReport
    frm17CImagerRunScreenHiRes.CWIMAQVision1.MathLookup myImage, myImage, 0, , HistogramReport(1).PixelRange.Min, HistogramReport(1).PixelRange.Max
    'Set myImage2 = myImage
   
    frm17CImagerRunScreenHiRes.CWIMAQVision1.Symmetry myImage, myImage, cwimaqSymmetryVertical 

    frm17CImagerRunScreenHiRes.CWIMAQVision1.Rotate2 myImage, myImage, 90 'rotate the image 90 degrees clockwise
   ' frm17CImagerRunScreenHiRes.CWIMAQViewer1.Attach myImage2

   
    JPEGOptions.Quality = 1000  'Default = 750, Max = 1000
   
    TempFileName = CurrentFolder & CurrentPlate & "_" & CurrentWell & ".jpeg"
    BkUpImgPath = CurrentPlate & "\" & CurrentPlate & "_" & CurrentWell & ".jpeg"
   
    WritePrivateProfileString CurrentWell, "Image" & NumPic, CurrentPlate & "_" & CurrentWell & "_" & NumPic & ".jpeg", CurrentFile
    WritePrivateProfileString CurrentWell, "Data" & NumPic, CurrentWell, CurrentFile
   
    frm17CImagerRunScreenHiRes.CWIMAQVision1.WriteJPEGFile myImage, TempFileName, JPEGOptions

 

I hope someone spots what I'm missing.

Thanks,

 

dave

0 Kudos
Message 1 of 2
(3,091 Views)
Nevermind.  I ended up doing some image manipulation with a separate class after saving it to a .jpg file.
0 Kudos
Message 2 of 2
(3,071 Views)