GithubHelp home page GithubHelp logo

Comments (7)

knmcguire avatar knmcguire commented on August 16, 2024 1

This has been completely reworked with the new AIdeck example, so this issue will probably no longer hold. If it does, please reopen!

from aideck-gap8-examples.

knmcguire avatar knmcguire commented on August 16, 2024

Hi, Lets talk further here then since this is an actual bug.

There is probably something wrong indeed. Unfortunately the JPEG compression written in the SDK is not conventional. You mentioned the double buffering before in the forum, but not sure if that will fix the problem either.

This week we will not have time to look in this in more detail so this needs to be done next week at our side.

from aideck-gap8-examples.

LorenzoLamberti94 avatar LorenzoLamberti94 commented on August 16, 2024

Thank you kimberly

I printed the stream of data on both sender (GA8 to NINA) and receiver side (laptop Python script)

i might have found the source of the problem: the last packet sent is sent after the end of image string (footer = 0xffd9).
To better unverstand, this is what we should have:
header
packet
....
packet
packet
footer

what we are actually receiving
header
packet
....
packet
footer
packet

It seems also that GAP8 communicates only once to NINA the header and footer of JPEG, and NINA actually attach them to the bitstream. In this file.

I''ll look further next week. Thanks!

from aideck-gap8-examples.

knmcguire avatar knmcguire commented on August 16, 2024

The streamer file on the gap8 side were sending the jpeg in a unconventional way by only sending the header and footer once first, so that is why the NINA is patching this up. But maybe something went wrong in the patching part of things

from aideck-gap8-examples.

LorenzoLamberti94 avatar LorenzoLamberti94 commented on August 16, 2024

I suppose that the problem is in these lines
https://github.com/bitcraze/AIdeck_examples/blob/master/NINA/firmware/main/ai-deck-jpeg-streamer-demo.c#L135-L142

the order is not correct, i would reorder like this:

    wifi_send_packet( (const char*) buffer, size);

    if (new_frame) {
      wifi_send_packet( (const char*) &jpeg_footer, sizeof(jpeg_footer) );
    }

    if (new_frame) {
      wifi_send_packet( (const char*) &jpeg_header, sizeof(jpeg_header) );

i would give it a try but i couldnt flash NINA correctly, maybe you can help me on this

from aideck-gap8-examples.

knmcguire avatar knmcguire commented on August 16, 2024

Hi! Good call!

I will give it a go this week. I will need to go to the office to pick up a programmer since the one that I have here is malfunctioning, so once I have I can try it out.

from aideck-gap8-examples.

evoggy avatar evoggy commented on August 16, 2024

Yes, this seems to be the issue. There was also some changes needed in the python script that receives the image. I've pushed a new version of the Nina application and the python script, could you give it a try and see if it solves the issue?

from aideck-gap8-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.