Ask Your Question
0

Normalized standard deviation

asked 2015-01-16 02:39:31 -0600

kovand11 gravatar image

What is the easiest way to calculate normalized standard deviation for a certain region of an image?

edit retag flag offensive close merge delete

Comments

Don't you want to say normalized by standard deviation? see this for how to do it. You can also use normalize for normalization, but I am agraid that I am not really understanding your question. Maybe it is a normalization first (if no values, than it's between 0 and 1) and then compute meanStdDev

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-01-16 02:58:37 -0600 )edit
1

In the meantime, I looked up the exact definition which I hadn't known before, that's why I asked the question. In fact, it is only a division by the squared mean.

kovand11 gravatar imagekovand11 ( 2015-01-16 03:58:16 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
4

answered 2015-01-16 02:50:01 -0600

berak gravatar image

updated 2015-01-16 02:52:08 -0600

you could use meanStdDev for this.

Mat m(5,5,CV_8U);
randu(m,0,100);

Rect roi(2,2,2,2);

cerr << m << endl;
cerr << m(roi) << endl;

Scalar mea,dev;
meanStdDev( m(roi), mea, dev );

cerr << mea << endl;
cerr << dev << endl;

[  6,  97,  39,  29,  97;
  10,  86,  93,  76,  29;
  51,  38,   7,  38,  75;
  23,  18,   1,  17,   3;
  53,  43,  75,  64,  48]
[  7,  38;
   1,  17]
[15.75, 0, 0, 0]
[14.0601, 0, 0, 0]
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-01-16 02:39:31 -0600

Seen: 1,952 times

Last updated: Jan 16 '15