Home Image-Pro General Discussions

Image size

Hi, I am struggling with how to know the size of the image I am taking, I am trying to count the number of objects within an image and to create a 'concentration' by knowing what space they occupy. Do I need to draw a line over the image in horizontal and vertical directions? Any help would be greatly appreciated.

Best Answer

  • Answer ✓
    Hi BTP,

    First you need to calibrate the image: just capture an image with a micrometer and create calibration. The easiest way is to use "Quick calibration" (Capture tab, Calibration group, Create dropdown). There is also "Auto-calibration" option that works on images with micrometer. (more details you can find in Help)

    Then you just draw measurement lines (Measure tab, Direct group) and the length will be reported in the data table. You can also make the length to be shown on the image, if you set measurement label text to "Measurement" (Measurement options panel).

    Also, there are many other ways to get image area besides drawing lines.

    Regards,

    Yuri

Answers

  • If you are using Count/Size, then you can use "Percent Area (%)" measurement to find the area percentage of the object to whole image (or ROI) area.

    Yuri
  • 2020-02-07-125032

    BTP --

    If you are working with a MACRO and you calculating

        CONCENTRATION = COUNT / AREA

    Then:
    1. Get the COUNT
    2. Get the IMAGE AREA
    3. Divide COUNT by IMAGE AREA to get CONCENTRATION
    Get the COUNT with something like

                    'CONNECT WITH THE AREA MEASUREMENTS IN THE IMAGE
                    Dim My_Measure1 As New MeasEntry
                    My_Measure1.Measurement = _
                        eMeasures.RgnArea

                    'LEARN THE STATISTICS FOR THE OBJECTS IN THE IMAGE
                    Dim My_Stats1(9) As Double
                    My_Data1.CalcStatistics(My_Measure1,My_Stats1)

                    '0 -- mcStatsMean -- mean value
                    '1 -- mcStatsStDev -- standard deviation
                    '2 -- mcStatsMin -- minimum value
                    '3 -- mcStatsMax -- maximum value
                    '4 -- mcStatsRange -- range
                    '5 -- mcStatsSum -- sum
                    '6 -- mcStatsIMin -- index Of minimum
                    '7 -- mcStatsIMax -- index Of maximum
                    '8 -- mcStatsNItems -- number Of items

                    'UPDATE THE DIALOG BOX

                    textBox_BackgroundCount.Text =
                        Format(My_Stats1(8),"#,##0")


    Get the IMAGE AREA with something like

            'Determine the IMAGE WIDTH and IMAGE HEIGHT
            Dim MyImageWidth As Integer = _
                ThisApplication.Activeimage.Width
            Dim MyImageHeight As Integer = _
                ThisApplication.Activeimage.Height

    and determine the CALIBRATION INFORMATION with something like

            'Learn the SPATIAL CALIBRATION INFO for this IMAGE
            Dim MyTempCalibUnits As String
            Dim MyTempCalibPixelSize As Single

                    MyTempCalibUnits = _
                        ThisApplication.ActiveImage.SpatialCalibration.UnitAbbrev
                    MyTempCalibPixelSize = _
                        ThisApplication.ActiveImage.SpatialCalibration.PixelSizeX

    Now you can figure the CALIBRATED IMAGE AREA and then you can divide that value into the COUNT to get your concentration.

    I hope this information is helpful.

    -- Matt

  • Thanks Both, unfortunately Matt I have no experience of macros so will be unable to follow these instructions.
    I don't quite want to do the calculation in the software but am very keen to know if the software will allow me to draw a line and know the length of that line. I have already calibrated the microscope with a stage micrometer, is there a way to simply see these line lengths within the software?
  • 2020-02-10-114253

    BTP --

    It sounds like some tailored training and perhaps just a bit of macro programming would be very beneficial to you.

    Please contact me if you would like a quotation for time to perform this for you.

    My contact info is below.

    I hope this information is helpful.

    -- Matt

    Matthew M. Batchelor
    President and Applications Engineer
    Alces Imaging and Automation, LLC
    Office: 281-646-7477


Sign In or Register to comment.