Author Topic: ML code development  (Read 5217 times)

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 2218
ML code development
« on: May 09, 2015, 03:48:31 PM »
Like many I love the compile in the cloud tool, as it allows me to test tweaks on ML code, for instance I added diffraction to the DoF feedback. But here's my problem.

My coding skill is at a novice level, for example Alex improved on my coding :-)

I keep reading the ML code, but as many I'm sure have found, it is not easy to reverse engineer code, especially when the functions are spread out over the various .c and .h files. It takes a lot of time.

I have tried asking questions on the forum, but I'm afraid not got anywhere with this approach, ie people are busy and I get that.

This area of the forum is meant to be where we ask for help. So my question is simple, do new coders like me continue to ask questions here, or should we create a new area of the forum where new code developers like me can ask coding questions and seek help from a group of mentors who are prepared to give their time.

Cheers

Garry

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: ML code development
« Reply #1 on: May 10, 2015, 01:55:20 AM »
Anything related to development should go here imo.

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 2218
Re: ML code development
« Reply #2 on: May 10, 2015, 02:48:00 AM »
@Audionut

I'm happy with that, I was just trying to be sensitive to developers and other coders being 'diverted' on education.

There is nothing more frustrating than asking a question and not getting an answer, because others are too busy.

Cheers

Garry

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: ML code development
« Reply #3 on: May 10, 2015, 05:39:11 AM »
Agreed.

Maybe try making your questions more stimulating.

http://www.catb.org/esr/faqs/smart-questions.html#intro
That's more helpful for newbies, but there may be some info you find useful.

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 2218
Math Functions
« Reply #4 on: May 10, 2015, 04:07:41 PM »
Before I waste a lot of time generating errors, could some guru or coder confirm the limits of the ML C code.

So far I know I can use sqrtf.

But I now need to access some other functions, eg arctan.

So my question is should I use atan or atan2

Also is there an ML page or a bitbucket page where I can browse info on what the core ML is capable of, eg a list of math functions; so I don't have to keep asking dumb questions.

Thanks for your help.

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 2218
Lens Info Access in zebra.c
« Reply #5 on: May 10, 2015, 07:55:41 PM »
I'm looking to change a few things in zebra.c and need access to the focal length, eg:

Code: [Select]
const uint64_t  fl = info->focal_len;
Clearly 'just' calling the above generates an undeclared error.

Could some kind person put me out of my misery, ie what addition coding do I need to access lens info in zebra.c.

Cheers

Garry

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: ML code development
« Reply #6 on: May 12, 2015, 03:58:32 AM »
lens_info.focal_len

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 2218
Re: ML code development
« Reply #7 on: May 12, 2015, 06:24:31 AM »
@dmilligan

First, thanks for coming back to me.

I'm pleased to say I independently worked it out as well :-) I'm gradually reverse engineering the ML code.

May I ask one more question to allow me to complete my project.

I'm in zebra.c and using this piece of code.

Code: [Select]
#ifdef CONFIG_FULLFRAME
    unsigned       sen = 43270; // sensor diagonal in mm*1000 for full frame
    #else
    unsigned       sen = 27043; // sensor diagonal in mm*1000 for crop frame
    #endif

But it seems sen must return rubbish.

Can you see anything wrong with my fullframe test?

Cheers

Garry