[Elphel-support] unable to read image from elphel camera webpage via MATLAB

aditya jog aditya8dragon at gmail.com
Wed Apr 23 02:57:16 PDT 2014


Dear sir,

First of all thanks a lot for your reply.

I have one more query.

as given in elphel JP4 wiki,

command    * To get online buffered image from cam*

 * I =imread('http://192.168.0.9:8081/11453824/bimg'
<http://192.168.0.9:8081/11453824/bimg'>); *

But unfortunately Matlab code is unable to read image from camera webpage
by above command.


please help . also find my attached code in which above command is not
executing.

please reply as early as possible.

thanking you
Aditi
India


On Tue, Apr 22, 2014 at 3:02 AM, Alexandre Poltorak <a.poltorak at foxel.ch>wrote:

> Hi Aditi,
>
> This is the most basic way probably :
> http://wiki.elphel.com/index.php?title=JP4#JP46_image_decoding_in_MATLAB
>
> It does not use the RTSP video stream, but just single image snapshot from
> ImgSrv - http://wiki.elphel.com/index.php?title=Imgsrv
>
> Best regards,
> Alexandre Poltorak
> CTO
>
> Office: +41 22 341 3300
> Mobile: +41 79 696 4225
> Email: a.poltorak at foxel.ch
> Web: www.foxel.ch
>
> FOXEL SA
> Chemin de Champ-Claude 10
> 1214 Vernier, Geneva, Switzerland
>
> This email can contain privileged information and is to be considered as
> confidential. If you have received this email by error, please delete it.
> If you are not the intended recipient of this email, the disclosure or use
> of its contents is prohibited.
>
> Ce courrier électronique peut contenir des informations couvertes par le
> secret professionnel et doit être considéré comme confidentiel. Si vous
> avez reçu ce courrier électronique par erreur, merci de le détruire. Si
> vous n'êtes pas le destinataire de ce message, vous n'êtes pas autorisé à
> en révéler le contenu ni à en faire usage.
>
> ------------------------------
>
> *De: *"andrey" <andrey at elphel.com>
> *À: *"Elphel List" <support-list at support.elphel.com>
> *Envoyé: *Lundi 21 Avril 2014 23:18:45
> *Objet: *[Elphel-support] Fwd: Auto-discard notification
>
>
>
>
> ---------- Forwarded message ----------
> From: *Aditi Jog* <jogaditi100 at gmail.com>
> Date: Thu, Apr 17, 2014 at 1:58 PM
> Subject: Elphel camera 353 Interfacing with Matlab
> To: support-list at support.elphel.com
>
>
> Dear sir,
>
> Myself Aditi. I am student from India. Currently working on your Elphel353
> camera for one of the project in IIT-Bombay.
>
> We would like to *interface this Elphel 353 camera with MATLAB.*
>
> please help us in this matter.
>
> *please provide us command s in MATLAB which can used to capture image via
> Elphel camera with use of MATLAB and Ethernet port.*
>
>
> please reply.
>
> thanks in advance,
> Aditi
> Research fellow
> IIT-Bombay
>
>
>
> ====================== End of Forwarded Mail ======================
>
>
>
> _______________________________________________
> Support-list mailing list
> Support-list at support.elphel.com
> http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com
>
>
>
> _______________________________________________
> Support-list mailing list
> Support-list at support.elphel.com
> http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20140423/4bb87e49/attachment-0002.html>
-------------- next part --------------

                                     % ELPHEL CAMERA MATLAB IMAGE CAPTURING CODE


%   get online buffered image from cam.   

% this image is obtained when i connect elphel camera with my computer. you can change as per your  generated image name and number.

   I=imread('http://192.168.0.9:8081/11453824/bimg');   

I=I(:,:,1);            %strip color data

II=deblock16x16(I);    %deblock image

 %file deblock16x16.m
 y=deblock16x16(I)
y0=uint8(zeros(size(I)));
for x=1:16:size(I,1)
  for y=1:16:size(I,2)
    blk16=I(x:x+15,y:y+15);
      for dx=0:7
        for dy=0:7
          y0(x+2*dx  ,y+2*dy)   = blk16(dx+1,dy+1);
          y0(x+2*dx+1,y+2*dy)   = blk16(dx+9,dy+1);
          y0(x+2*dx  ,y+2*dy+1) = blk16(dx+1,dy+9);
          y0(x+2*dx+1,y+2*dy+1) = blk16(dx+9,dy+9);
        end
      end
    end
  end
y=y0;

J=demosaic(II,'gbrg');

imshow(J);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JP4_Elphel.asv
Type: application/octet-stream
Size: 820 bytes
Desc: not available
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20140423/4bb87e49/attachment.obj>


More information about the Support-list mailing list