Page 1 of 2

lines across images

Posted: Tue May 26, 2009 9:58 pm
by jeremym
Does anyone have recommendations for things to try to remove the black lines (around 1px height, 400px width) across images?

We are using Ubuntu 8 64-bit with two PV-183 16 cards.

zoneminder 1.24.1
Ubuntu 8.04.2 2.6.24-19-server

640x480 ~16fps

Thanks.

Posted: Tue May 26, 2009 10:19 pm
by kingofkya
do you mean the interlaceing

Posted: Tue May 26, 2009 10:30 pm
by jeremym
yeah. When there is movement (car, person, tree) the image shows horizontal black lines in the shape of the object.

Posted: Tue May 26, 2009 10:31 pm
by jeremym
I can send a video if you would like to see.

Posted: Wed May 27, 2009 10:20 pm
by jeremym
Changed the source to video4linux 2 NSTC M and it helped.

Posted: Wed May 27, 2009 10:38 pm
by kingofkya
yeah your not really gonna get rid of it on thous cams

Posted: Mon Jun 01, 2009 9:57 pm
by jeremym
okay I will test out some other cameras from bluecherry and post the results.

Posted: Tue Jun 02, 2009 5:22 am
by Normando
jeremyn, this is not an interlacing problem.

This is a shared memory configuration problem.
Try reducing the size, to 320 x 240, and also reduce the FPS to 10.
Post the results.

Posted: Fri Jun 05, 2009 9:05 pm
by cordel
The combing effect is likely interlacing:
http://en.wikipedia.org/wiki/Interlace

So if you see something like the examples in the article above, it is common to all formats standards. You can reduce the image to 320x240 for NTSC and this will negate the need for interlacing. I don't recall off the top what the proper setting are for PAL to stop interlacing but they are slightly higher if you are using PAL cameras.

Posted: Wed Jun 10, 2009 2:05 pm
by jeremym
Changed to Ubuntu 8.04 32-bit and increased shared memory even more and there are only a few lines when there is motion.

Thanks!

http://www.zoneminder.com/wiki/index.ph ... esolutions.

Code: Select all

# cat /proc/sys/kernel/shmall
334217728
# cat /proc/sys/kernel/shmmax
334217728
# cat /proc/meminfo | grep ^Mem
MemTotal:      3621880 kB
MemFree:       2562992 kB

Posted: Sun Jun 14, 2009 6:01 pm
by BrownBottle
Try changing the device format to 'RGB565'. This will reduce the color load on the system.

Posted: Mon Jun 15, 2009 9:34 am
by marv2097
I am getting a similar issue on my install with lines only on Motion.

My machine is a 3.0ghz P4 with 1 gig ram. It has a 8 port 240fps bttv based card. At the moment I only have 3 cams linked up and they are all PAL cameras. Running Ubuntu 0904-desktop (2.6.28-11-generic) with ZM compilled from source a week ago.

The camera in question is running in V4L2-PAL-Grey at a resolution of 480x384 and 5fps with record or mocord. Here is the image I get, as can be seen only the moving car has the lines and the parked ones dont:

Image

I have increased the size of the shared memory. Old values:

Code: Select all

marv@zoneminder:/tmp$ cat /proc/sys/kernel/shmall
2097152
marv@zoneminder:/tmp$ cat /proc/sys/kernel/shmmax
33554432
marv@zoneminder:/tmp$ cat /proc/meminfo | grep ^Mem
MemTotal:         961968 kB
MemFree:           26036 kB
marv@zoneminder:/tmp$

marv@zoneminder:/tmp$ ipcs -l

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 32768
max total shared memory (kbytes) = 8388608
min seg size (bytes) = 1
To the new ones:

Code: Select all

marv@zoneminder:~$ cat /proc/sys/kernel/shmall
4194304
marv@zoneminder:~$ cat /proc/sys/kernel/shmmax
4194304000
marv@zoneminder:~$ cat /proc/meminfo | grep ^Mem
MemTotal:         961968 kB
MemFree:           12984 kB
marv@zoneminder:~$ ipcs -l

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 4096000
max total shared memory (kbytes) = 16777216
min seg size (bytes) = 1
So now the max segment size should be around 4 gig and the max overall 16 gig.

After reducing the resolution to 320x240 the problem seems to be removed. As the white Van on the left doesnt have the same lines:


Image


I would like to keep a higher resolution. I am also planning to add some IP cameras at megapixel resolution and dont want the same issue with them.

It may also be worth noting that all of this hardware has been moved over from a windows based system with the exact same setup and all 8 cameras running using the Kodicom SITE software. This ran at 720x576 with no issues. So I know the hardware should be good and I want to tweek the system to get it working better with ZM.

Has anyone any ideas what could be causing the lines in the slightly higher res?

Many thanks.

// Marv

Posted: Mon Jun 15, 2009 4:11 pm
by Normando
Marv, your case is interlaceing. See the Cordel's reply and read the wikipedia page.

This is not the same case of Jeremym. He say "Does anyone have recommendations for things to try to remove the black lines (around 1px height, 400px width) across images?"

To avoid this visual effect, that only occur on the objects moving, you must use a non.interleaced camera.

I think this effect occur only when viewing the live, but if you create a video from these images, you will see without interleacing (I think).

Also try to use an LCD monitor to view live cameras.

Posted: Mon Jun 15, 2009 5:48 pm
by kingofkya
or used one of the guis with the deinterlaceing filters

or if a sugested make a video of it and play with a media player most have one

Posted: Tue Jun 16, 2009 9:26 am
by marv2097
Thanks Guys,

I did have the same black line issue at first but the memory limit increase seemed to sort that which is when the interlacing issue becomes more noticeable.

I get this in live and playback views and even when i export the video. I also have the same issue when viewed in ZM4MS. The only way to see the image without it is to export and playback in VLC with the de-interlace filter on.

Is there an option somewhere with ffmepg or ZM to de-interlace? As I mentioned I never had this issue with the kodicom software (same cameras) so maybe it was de-interlacing in the background somehow.

Many thanks
Marv