News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Help on CCTV Camera Driver (SIMD Assembly Language)

Started by opmat, January 23, 2013, 02:23:07 AM

Previous topic - Next topic

opmat

This is to anyone who can help. I need all the idea I can get on this project, I'm new to Assembly Language but needs to get this assignment done.

"The project involves receiving 640 X 480 pixels  24 bit RGB color digital video from four CCTV camera. These four channels of video are to be resized to 320 x 240 pixels and displayed simultaneously on a 1280 X 960 pixel screen split into 4 display windows, Develop your display driver in SIMD assembly language"

I know I'm supposed to learn
1. how to receive the video input
2. how to compress 640 x 480 pixels video to 320 x 240 pixel
3. Positioning this videos on the screen

but I have no idea how to go about it. Any idea no matter how little is appreciated.

Thanks

Farabi

I dont know the "Magic" byte of your hardware but for resizing the picture you can use GDI and GDI plus. Give me the hardware port address,  the value to give the command to the hardware like sending data or read data and I can help you.
http://farabidatacenter.url.ph/MySoftware/
My 3D Game Engine Demo.

Contact me at Whatsapp: 6283818314165

opmat

Quote from: Farabi on January 23, 2013, 02:36:09 AM
I dont know the "Magic" byte of your hardware but for resizing the picture you can use GDI and GDI plus. Give me the hardware port address,  the value to give the command to the hardware like sending data or read data and I can help you.

Hi Farabi!
I don't really understand what you meant by "Magic" byte. Can you please explain how I can get that?

dedndave

i wouldn't worry about a magic byte - lol
i would worry about how to write the device driver   :redface:

Tedd

You'll need to know how the camera will be connected (USB, Firewire, Serial, ..?) - then you can find out how to receive the stream of data (the encoded images.)
Then you'll need to find out what format the data is in so you can decode it into a usable form (pixels?)

Once you have a usable data format, resizing 640x480 to 320x240 can be very simple (take every second pixel from every second row) or more complex (average overlapping 4x4 blocks of pixels.)
If you resize 4 images to 320x240, arranged 2x2 would give a 640x480 area, but the screen is 1280x960, so this would only take up 1/4 of the screen ..?

Positioning the video output on the screen depends on how you're sending the output and what its encoding should be.
Potato2

opmat

Quote from: Tedd on January 23, 2013, 05:51:29 AM
You'll need to know how the camera will be connected (USB, Firewire, Serial, ..?) - then you can find out how to receive the stream of data (the encoded images.)
Then you'll need to find out what format the data is in so you can decode it into a usable form (pixels?)

Once you have a usable data format, resizing 640x480 to 320x240 can be very simple (take every second pixel from every second row) or more complex (average overlapping 4x4 blocks of pixels.)
If you resize 4 images to 320x240, arranged 2x2 would give a 640x480 area, but the screen is 1280x960, so this would only take up 1/4 of the screen ..?

Positioning the video output on the screen depends on how you're sending the output and what its encoding should be.

I'm thinking of using four webcam connected via usb as a test case

Farabi

Quote from: opmat on January 23, 2013, 08:46:18 AM
Quote from: Tedd on January 23, 2013, 05:51:29 AM
You'll need to know how the camera will be connected (USB, Firewire, Serial, ..?) - then you can find out how to receive the stream of data (the encoded images.)
Then you'll need to find out what format the data is in so you can decode it into a usable form (pixels?)

Once you have a usable data format, resizing 640x480 to 320x240 can be very simple (take every second pixel from every second row) or more complex (average overlapping 4x4 blocks of pixels.)
If you resize 4 images to 320x240, arranged 2x2 would give a 640x480 area, but the screen is 1280x960, so this would only take up 1/4 of the screen ..?

Positioning the video output on the screen depends on how you're sending the output and what its encoding should be.

I'm thinking of using four webcam connected via usb as a test case

Did you lost the CD Driver or you built your own webcam? So Windows did not detected it automatically?
http://farabidatacenter.url.ph/MySoftware/
My 3D Game Engine Demo.

Contact me at Whatsapp: 6283818314165

tenkey


opmat

It's actually an assignment in my Assembly Language class

"The project involves receiving 640 X 480 pixels  24 bit RGB color digital video from four CCTV camera. These four channels of video are to be resized to 320 x 240 pixels and displayed simultaneously on a 1280 X 960 pixel screen split into 4 display windows, Develop your display driver in SIMD assembly language"

I'm targeting 32-bit Processors

hfheatherfox07

#9
@tenkey
Well .....SIMD is not an assembler , rather instruction type
Google is amazing ... SIMD Definition :

http://en.m.wikipedia.org/wiki/SIMD

Please read about "SIMD instructions"
Under Instruction types
Here:

http://en.m.wikipedia.org/wiki/X86_assembly_language


@opmat
You mentioned that you are a bigner , not sure what that means ( what level you are at?)

If you a bigner to assembler in MASM ( note there are other like:
TASM NASM FASM ...)
May I suggest learning some basics from
http://win32assembly.programminghorizon.com/tutorials.html


We do have some app examples for webcam capture
http://www.masmforum.com/board/index.php?PHPSESSID=786dd40408172108b65a5a36b09c88c0&topic=6271;prev_next=next

http://masm32.com/board/index.php?topic=429.15

They are very advanced , at least for me at this time,
I have another example that I know works in capturing webcam, I would have to dig it up...
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

hfheatherfox07

Quote from: dedndave on January 23, 2013, 03:30:44 AM
i wouldn't worry about a magic byte - lol
i would worry about how to write the device driver   :redface:

lol
KmdKit.zip would be a good start ....
But as far as I know a device driver helps operate the device like a printer driver for example ....( basically to identify the webcam to the computer and let know it is there , and register it to a port in the device manager
)
I posted a link to the example that you uploaded of the software ....
If opmat wants to show a video won't that be an application , and not a driver?

That will be pretty hard to write a device driver for that specific web cam...
opmat will have to contact the manufacture for specs...

Wouldn't opmat need to contact the web cam manufacturer for specs to write a device driver?


Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

dedndave

if the USB is configured as a serial device, it isn't as bad as i thought it'd be
no device driver needed
but, you still need the data format   :P

hfheatherfox07

In any case ,
the links to those examples you posted are what opmat needs  :t
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

Farabi

Opmat, did youre lecture gave you something like book or something. And also, carefull, read the rules, this is your homework. And we cant help you for this.
http://farabidatacenter.url.ph/MySoftware/
My 3D Game Engine Demo.

Contact me at Whatsapp: 6283818314165

dedndave