thanks for viewing..
i am working on region identification of image. i am using Fred's magic wand script .i am working on windows so i extracted the commands of the script and i got satisfactory result as below:

i am giving x,y co-ordinates for selecting region as u can see the black circle mark and 29% tolerance value and got this output which is perfect..
getting exact mask.

but when i tried for below image the results are not satisfactory

for 20% tolerance
output:

i want only the mask of selected furniture right hand sofa .
if i am decresing the toleance value to 19% got the below output which is not giving whole area of right hand furniture which i am selecting

same i faced problem while selecting other region as below

for 21% tolerancefor 21% tolerance

but it is also not proper mask as the curtains also get selected which i dont want only middle sofa should get selected.
what i come to know about magicwand script..that it selects contiguous region from specified x,y co-ordinates and this selection depends also tolerance value.
so can u please tell solution to my problem. Is there is way in magicwand script commands so that i get proper mask.
any help will be appreciated