¿Cómo utilizar el umbral OTSU en opencv?

Estaba usando un umbral fijo pero resulta que no es tan bueno para mí. Entonces, alguien me habló del umbral de otsu. ¿Cómo puedo usarlo en mi código? Lo leí y no lo entiendo muy bien. ¿Podría alguien explicarme cómo usarlo en OpenCV el umbral de otsu?

Aquí está mi código ahora:

#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>

using namespace cv;

int main ( int argc, char **argv )
{
   Mat im_gray = imread("img3.jpg",CV_LOAD_IMAGE_GRAYSCALE);

   Mat im_rgb  = imread("img3.jpg");
   cvtColor(im_rgb,im_gray,CV_RGB2GRAY);

   Mat img_bw = im_gray > 115;

   imwrite("img_bw3.jpg", img_bw);

   return 0;
}  

Con esto tengo que cambiar el umbral a cualquier imagen que quiera convertir a binario. Encontré esto:

cvThreshold(scr, dst, 128, 255, CV_THRESH_BINARY | CV_THRESH_OTSU);

¿Está bien? No entiendo muy bien y, debido a eso, no sabía cómo podía adaptarme a mi código.

Respuestas a la pregunta(3)

Su respuesta a la pregunta