Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who's Online
1 user(s) are online (1 user(s) are browsing Forum)

Members: 0
Guests: 1

more...

Browsing this Thread:   1 Anonymous Users



« 1 2 (3)


Re: lsusb -> "Please use c:loadresource"

Joined:
2007/8/21 11:21
Group:
Member
Posts: 148
Offline
here some nice small C-code for the conversion:

http://wss.co.uk/pinknoise/yuv2rgb/yuv2rgb003.zip

Posted on: 2015/5/6 15:53
Transfer the post to other applications Transfer


Re: lsusb -> "Please use c:loadresource"

Joined:
2010/1/8 10:07
Group:
Member
Posts: 1413
Offline
this can be handy..

void bayer2rgb24(unsigned char *dstunsigned char *srclong int WIDTHlong int HEIGHT)
{
    
long int i;
    
unsigned char *rawpt, *scanpt;
    
long int size;

    
rawpt src;
    
scanpt dst;
    
size WIDTH*HEIGHT;

    for ( 
0sizei++ ) {
    if ( (
i/WIDTH) % == ) {
        if ( (
2) == ) {
        
/* B */
        
if ( (WIDTH) && ((WIDTH) > 0) ) {
            *
scanpt++ = (*(rawpt-WIDTH-1)+*(rawpt-WIDTH+1)+
                 *(
rawpt+WIDTH-1)+*(rawpt+WIDTH+1))/4;    /* R */
            
*scanpt++ = (*(rawpt-1)+*(rawpt+1)+
                 *(
rawpt+WIDTH)+*(rawpt-WIDTH))/4;    /* G */
            
*scanpt++ = *rawpt;                    /* B */
        
} else {
            
/* first line or left column */
            
*scanpt++ = *(rawpt+WIDTH+1);        /* R */
            
*scanpt++ = (*(rawpt+1)+*(rawpt+WIDTH))/2;    /* G */
            
*scanpt++ = *rawpt;                /* B */
        
}
        } else {
        
/* (B)G */
        
if ( (WIDTH) && ((WIDTH) < (WIDTH-1)) ) {
            *
scanpt++ = (*(rawpt+WIDTH)+*(rawpt-WIDTH))/2;    /* R */
            
*scanpt++ = *rawpt;                    /* G */
            
*scanpt++ = (*(rawpt-1)+*(rawpt+1))/2;        /* B */
        
} else {
            
/* first line or right column */
            
*scanpt++ = *(rawpt+WIDTH);    /* R */
            
*scanpt++ = *rawpt;        /* G */
            
*scanpt++ = *(rawpt-1);    /* B */
        
}
        }
    } else {
        if ( (
2) == ) {
        
/* G(R) */
        
if ( (< (WIDTH*(HEIGHT-1))) && ((WIDTH) > 0) ) {
            *
scanpt++ = (*(rawpt-1)+*(rawpt+1))/2;        /* R */
            
*scanpt++ = *rawpt;                    /* G */
            
*scanpt++ = (*(rawpt+WIDTH)+*(rawpt-WIDTH))/2;    /* B */
        
} else {
            
/* bottom line or left column */
            
*scanpt++ = *(rawpt+1);        /* R */
            
*scanpt++ = *rawpt;            /* G */
            
*scanpt++ = *(rawpt-WIDTH);        /* B */
        
}
        } else {
        
/* R */
        
if ( < (WIDTH*(HEIGHT-1)) && ((WIDTH) < (WIDTH-1)) ) {
            *
scanpt++ = *rawpt;                    /* R */
            
*scanpt++ = (*(rawpt-1)+*(rawpt+1)+
                 *(
rawpt-WIDTH)+*(rawpt+WIDTH))/4;    /* G */
            
*scanpt++ = (*(rawpt-WIDTH-1)+*(rawpt-WIDTH+1)+
                 *(
rawpt+WIDTH-1)+*(rawpt+WIDTH+1))/4;    /* B */
        
} else {
            
/* bottom line or right column */
            
*scanpt++ = *rawpt;                /* R */
            
*scanpt++ = (*(rawpt-1)+*(rawpt-WIDTH))/2;    /* G */
            
*scanpt++ = *(rawpt-WIDTH-1);        /* B */
        
}
        }
    }
    
rawpt++;
    }

}

Posted on: 2015/5/7 0:09
_________________
Lets build not destroy
http://serk118.blogspot.co.uk/
Transfer the post to other applications Transfer


Re: lsusb -> "Please use c:loadresource"

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 1006
Offline
Removed uvc header bytes and it all starts to look something recognizable.

https://youtu.be/r15rGNzJuBQ

There's a sweet spot on the payload size, once you hit it there is no need to sync the frames. :) Above video is without any syncing. Just raw pixelwrites to rastport.

I'm still unsure what the pixel format is. Above video should be 640x480 but it does not look like it. If I change the size to 320x240 then it looks exactly similar only smaller...

Posted on: 2015/5/7 11:57
Transfer the post to other applications Transfer


Re: lsusb -> "Please use c:loadresource"

Joined:
2007/8/21 11:21
Group:
Member
Posts: 148
Offline
is this cam in interlace mode?

Posted on: 2015/5/7 16:49
Transfer the post to other applications Transfer


Re: lsusb -> "Please use c:loadresource"

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 1006
Offline
Resurrecting this old post...

I fiddled a bit more with the PS3Eye camera as I bought two more PS3Eye cameras. There are some bandwidth issues when running two of them on Aros (Well Linux can not do it either without distortion)

https://youtu.be/XJXKwmE5WEM

There is a lot of distortion on the video when I move the mouse pointer on this Dell laptop (integrated USB pointer device) Is it a bandwidth issue or does the HID class do a lot of bad Forbids/Permits? Poseidons internal structures are protected in the bad way with them though, they should be modified to use semaphores.

I also tried the code on a IBM Thinkpad X31 with similar results.

I installed Aros on a USB stick and let the camera play at the same time and frames were dropped in sync with the CD rom reading the disk (it may well be that the frames dropped in sync with the USB writes...)

EDIT: I raised the task priority of PS3EyeTask to 10, but still frames are dropped when mouse is moved... bummer...

Posted on: 2015/10/21 23:03

Edited by DizzyOfCRN on 2015/10/21 23:29:25
Transfer the post to other applications Transfer


Re: lsusb -> "Please use c:loadresource"

Joined:
2008/10/11 22:43
Group:
Member
Posts: 679
Offline
Hi

Sorry to resurrect an old thread but do you still have the source for the PS3eye.class as it would be a shame to lose it as an example of what can be done or possible?

Might also be fun to see what it can do.

Jeff


Posted on: 10/1 18:27
Transfer the post to other applications Transfer


Re: lsusb -> "Please use c:loadresource"

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 1006
Offline
Quote:

jeffrey1138 wrote:
Hi

Sorry to resurrect an old thread but do you still have the source for the PS3eye.class as it would be a shame to lose it as an example of what can be done or possible?

Might also be fun to see what it can do.

Jeff


I placed a work in progress Zune gui app in rom/usb/guiapps/ps3eye as a Poseidon usb stack usage example. I was hoping that the more there is examples then the easier it would be for someone interested to start fiddling with usb on AROS. Not everyone liked that I put it in there. It doesn't show any video output, but it can take the ps3eye camera and grap it for it's own use and if you start another instance of ps3eye then that can take another camera.

I have the complete datasheet for the bridge chip used in ps3eye on my harddisk but that's on the shelf.

https://youtu.be/XCANfVh5FIY

Remove the usbaudio.class from Trident or else AROS will hang as it also wants to grab the camera device as it has a microphone, but there's really no isoc-transfers present on AROS usb drivers.

Posted on: 10/1 21:22

Edited by DizzyOfCRN on 2017/10/1 21:42:49
Transfer the post to other applications Transfer



« 1 2 (3)



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4364
2 magorium
magorium
4095
3 phoenixkonsole
phoenixkonsole
3892
4 nikolaos
nikolaos
3694
5 deadwood
deadwood
2923
6 ncafferkey
ncafferkey
2648
7 mazze
mazze
2214
8 clusteruk
clusteruk
2111
9 Kalamatee
Kalamatee
2024
10 damocles
damocles
1789
© 2004-2017 AROS Exec