MATLAB Answers

Normalize data 'before' or 'after' regionprops?

2 views (last 30 days)
Lim on 25 Jun 2013
After image segmentation, I use regionprops to extract the features for classification. My data consists of 500 samples with 13 features. The range of the features from regionprops is averagely between 0.1 to 20,000 (area of pixel).
My problem is, is it advisable to 'norm' the value (such as im2double?) before regionprops or the normalization can be done afterwards?
I tried norm_v = v/norm(v) between the big numbers ranging between 200-20,000, but the end result (0.001 - 0.99) is still not satisfying.
Please help.


Show 1 older comment
Lim on 25 Jun 2013
mean intensity, mean R mean G mean B, area, perimeter, diameter, roundness, convex hull, solidity The features that give large value are area, perimeter and diameter which gives the pixel value of the ROI
Lim on 3 Jul 2013
Hi. My purpose of normalizing data is to scale the value to [0 1]. Is it better to do an individual 'scaling' for each feature rather than an overall scaling?
Walter Roberson
Walter Roberson on 3 Jul 2013
It depends: is your preselection and labeling already enough to group pixels correctly, or are you using the results from regionprops to determine boundaries of the groupings but before putting them into the classifier ?

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 3 Jul 2013
regionprops won't measure anything less than 1 pixel so I'm not sure how you're getting 0.1 pixels for the area.
I'd recommend leaving your image as integer if you can, or leaving it as whatever floating point range it has if you can. If it forces you to scale your image to 0-1 with imdouble, then you'll have to unscale it later. But again, I'd prefer not to do any scaling at all - I rarely do, but then I've never tried to send in a floating point RGB image into regionprops to get intensity information (MeanIntensity). Of course for spatial measurements (area, perimeter, equivdiameter, etc0) you don't need to scale at all since measuring those is done purely from the binary image, not from the grayscale image (single color channel).


Lim on 4 Jul 2013
to Image Analyst and Walter: Actually my concern is whether the huge gap between the values will influence the performance/result of the classifier when the data is feed into the classifier. Now that I think about it, the huge gap is between different attributes and not within the same attribute, so I guess it won't affect the result? (Did I answer my own question?)
Image Analyst
Image Analyst on 4 Jul 2013
Not sure how to answer other than to say the shape-based measurements won't depend on whether your image is in the range 0-1 or 0-255. However your intensity-based measurements will and you just need to be aware of what range your intensities are in every step of the way.

Sign in to comment.

More Answers (0)

Sign in to answer this question.