Live streaming?

Among the other capabilities of detecting objects live streaming would be a very interesting thing. Is this featured? What acessories would be necessary for that?
Thanks!

Just the WiFi shield. Here’s a demo using the old camera and CC3000:

Note: we’re prototyping a better WiFi module, hopefully it will be ready soon.

It is wonderful! BTW, what is the App of HTC phone used for that demo?

Thanks

I can’t remember :slight_smile: search for “mjpeg” in the app store.

It support just mjpeg? If not, what others encode supported? Mpeg4, h264 and so on.

Thanks

Live streaming is just JPEG compressed images. We don’t have any fancy hardware encoder. h264 is usually implemented via a custom co-processor. You really only get that feature on super high end stuff.

How long does it take to compress 320x240 color image in JPEG? Im using encoder that encodes for 85ms YCbCr->JPEG and 105 ms RGB565->YCbCr->JPEG, its only 10fps.

Ibrahim was able to get 30 FPS last night using a line processing algorithm JPEG codec. However, I’m not sure how stable these results are. We’ll let you know once we’ve tried everything. The OV2640 will have higher frame rates than the OV7725 camera. But, the OV7725 has better quality right now. We have to manually compress images on the OV7725 camera.

Reality - I understand people are not going to be happy with the low res, that said, for security purposes you don’t nee more than 10 FPS. If you’re really interested in high quality video we expect you’ll have a second camera triggered by the OpenMV Cam. But, for recording purposes 320x240 at +10 FPS is pretty acceptable. You can see what’s going on more or less.

Note that I’m talking about saving images to the SD card. I have not clue how things will turn out with an internet connection.

Im using OV7720 (VGA/QVGA) connected to STM32F429I-DISCO via DCMI. Jpeg encoder was taken from here vt-fox-1/STM32L1_Code/encoder at master · mitchd/vt-fox-1 · GitHub and it works, but slowly. Thinking about libjpeg or encoder from openmv, but libjpeg throws errors in linking and openmv saves strange jpegs as attached.
IMAGE320.JPG

Yeah, we can’t really support not our hardware. But… the weird image is probably because we have to store the RG565 data byte reversed in RAM. Who knows… All that code has been really highly optimized by Ibrahim.

The current JPEG encoder can compress QVGA in ~70ms.
If you’re having problems using it, it’s probably parameters passed to the jpeg_compress (the destination buffer size should be set in dst->bpp it needs to be that way in our code), also there’s an RGB565 to YUV lookup it’s inverted like Kwabena mentioned, the RGB565 are assumed to be inverted (they’re read LSB first), that shouldn’t be a problem for you though.

Im writing directly to SDRAM, so I changed jpeg_put functions:

static void jpeg_put_char(jpeg_buf_t *jpeg_buf, char c)
{
    jpeg_buf->buf[jpeg_buf->idx++]=c;
}

static void jpeg_put_bytes(jpeg_buf_t *jpeg_buf, const void *data, int size)
{
    memcpy(jpeg_buf->buf+jpeg_buf->idx, data, size);
    jpeg_buf->idx += size;
}

And calling jpeg_compress from main:

#define SDRAM_BANK_ADDR	((uint32_t)(0xD0000000))

image_t src = {.w=IMG_WIDTH, .h=IMG_HEIGHT, .bpp=2, .data=(uint8_t*)SDRAM_BANK_ADDR};
image_t dst = {.w=IMG_WIDTH, .h=IMG_HEIGHT, .bpp=0, .data=((uint8_t*)SDRAM_BANK_ADDR + (IMG_WIDTH * IMG_HEIGHT * 2))};

jpeg_compress(&src, &dst, 90);
jpeg_size = dst.bpp;

But it hangs in a while cycle inside jpeg_calcBits:

static void jpeg_calcBits(int val, uint16_t bits[2]) {
    int t1 = val < 0 ? -val : val;
    val = val < 0 ? val-1 : val;
    bits[1] = 1;
    while(t1 >>= 1) {
        ++bits[1];
    }
    bits[0] = val & ((1<<bits[1])-1);
}

When I change (t1 >>= 1) to ((t1 >>= 1) > 0) it makes corrupted jpeg.

Looks like the int value should be an uint. Think about what would happen if t1 was the max negative value… right shift would copy the upper bits forever. The max negative 32 bit value can’t be ABSed like in the code. Anyway, that problem seems unlikely.

Sorry, I can’t help you more than that. We’ve got our own serious bugs over here.

Anyway thanks for answers, I’ll try to make it work.

Hi, initial support for WiFi streaming has been implemented in the latest FW/IDE release. We’re using the new Atmel WINC1500 WiFi module, it’s a really impressive module. Here’s a demo of WiFi streaming FIR images:

The WiFi module is available for pre-order:
https://openmv.myshopify.com/collections/preorder/products/preorder-wifi-shield