使用文本框值验证图像

I would like to validate captcha image with user written textbox value. Is it possible.? here is some code what i have

   <div class="jr_captcha" style="float: left;">
   <img id="captcha"    src="http://xyz/cache/1396449675.0744.jpg" width="100" height="30"    style="border:0;" alt=" ">
   </div>
   <input name="data[Captcha][code]" id="code" type="text" class="jr_captcha_code" size="5" maxlength="5">

Here is image which shows up text which i would like to read. (not able to add because of reputation) but image look like KkbLM

Is it possible to do that.? I don't have any idea how can i handle that.

NOTE:

--I'm working on joomla

--I cannot modify HTML or any coding behind component.

--I have to use javaScript, Jquery or backed PHP script.

Text on image cannot be read automatically. From your sample, the image is from http resource, find a way to retrieve the text on the image from same http source and store it in hidden field. This can then be compared with the textbox value.