function x = mser(boxImage, sceneImage)

size = 256;
boxImage = imresize(boxImage, [size size]);
sceneImage = imresize(sceneImage, [size size]);
boxImage = boxImage(:,:,2);
sceneImage = sceneImage(:,:,2);

boxPoints = detectMSERFeatures(boxImage);
scenePoints = detectMSERFeatures(sceneImage);

[boxFeatures, ~] = extractFeatures(boxImage, boxPoints);
[sceneFeatures, ~] = extractFeatures(sceneImage, scenePoints);

boxPairs = matchFeatures(boxFeatures, sceneFeatures);
x = length(boxPairs);