Kindly, discuss your problem in some details so the a person who is not expert in image processing can understand easily that what exactly you wanted to be done. It would be better if you can discuss it with an example.
I am unable understand what is the meaning of "interrupt image".
Thank you very much for your reply. I your algorithm you had given input as random number instead I have to pick that random number from image pixel value. This my question which Is already said. Please help me sir.