Bonjour & Bienvenue sur EOS-Numerique
Réseaux Sociaux : Follow us on Facebook Follow us on Twitter


Sign Up






Page 1 sur 3 123 DernièreDernière
Affichage des résultats 1 à 20 sur 44

Discussion: ED-SDK 2.7 En Delphi

  1. #1
    Membre
    Inscription
    janvier 2008
    Localisation
    France
    Messages
    26
    Boîtier
    Canon EOS 20D ~ EOS 7D
    Objectif(s)
    10-22 f/3.5-4.5 ~ 50 f/1.4 ~ Sigma 18-50 f/2.8 ~ 100 f/2.8 Macro ~ 100-400 f/4.5-5.6

    Par défaut ED-SDK 2.7 En Delphi

    Bonjour à tous,
    A terme je souhaite développer une appli pour l'astrophoto qui me permette de commander un Reflex Canon, mais pour le moment j'essaye déjà de maitriser les commandes de base.
    Petite difficulté supplémentaire, mon langage de prédilection est le Delphi, abandonné par Canon depuis la version 2.5 du SDK.

    J'ai donc commencé par télécharger toutes les version disponible du SDK, pour trouver les dernières sources en Delphi (SDK 2.4). J'ai ensuite essayé d'intégrer les différences avec le SDK le plus récent pour enfin faire mon propre programme de test.

    Les bases fonctionnent, mais pas beaucoup plus.

    J'arrive à charger le SDK, trouver le reflex, m'y connecter, récupérer ses règlages, les changer, prendre une photo et la télécharger (ce qui n'est déjà pas mal).

    Je bloque pour ce qui est de la prise Bulb et du LiveView. Bulb testé avec un 20D et un 7D, LiveView testé avec un 7D.

    Bulb
    Lorsque j'envoie kEdsCameraCommand_BulbStart
    7D : Erreur #44313 (0xAD19) - non documentée
    20D : Erreur #7 ( EDS_ERR_NOT_SUPPORTED )

    LiveView
    Lorsque j'appelle EdsDownloadEvfImage
    7D : Erreur de pointeur(là je pense peut-être trouver un jour une solution) + Erreur #97 (0x61 EDS_ERR_INVALID_HANDLE - ce qui me parait logique)

    Ces deux problème (Buld Et Liveview sont à prioris tottalement indépendant, mais si vous avez des pistes pour l'un où l'autre, je suis preneur.

    Mes sources (inutilisable sans le SDK 2.7 bien sur) : CCCp 0.0.9.rar (216ko)

    Juste pour comprendre comment s'articule mes sources : J'ai créé un Objet TCanonCamera pour faciliter l'utilisation du SDK. Les Méthodes de TCanonCamera se chargent d'appeler les méthodes du SDK "qui vont bien".

    Je suis ouvert à toute suggestion qui me permetrai d'avancer sur ce projet.
    Ah et si ces sources vous sont utiles, je vous en prie, servez-vous.

    Dernière modification par pixelk ; 14/01/2010 à 09h00.


  2. #2
    Membre
    Inscription
    janvier 2008
    Localisation
    France
    Messages
    26
    Boîtier
    Canon EOS 20D ~ EOS 7D
    Objectif(s)
    10-22 f/3.5-4.5 ~ 50 f/1.4 ~ Sigma 18-50 f/2.8 ~ 100 f/2.8 Macro ~ 100-400 f/4.5-5.6

    Par défaut

    J'ai avancé d'une ligne pour le LiveView \o/

    J'ai trouvé le format d'appel correct de EdsDownloadEvfImage
    et maintenant je bloque sur EvdGetPointer

    Source : CCCp 0.0.11 (35ko)

  3. #3
    Membre
    Inscription
    mars 2008
    Localisation
    France
    Messages
    31
    Boîtier
    EOS 40D
    Objectif(s)
    Tamron 17-50 f:2,8 100 mm macro 70-200mm f:4 L

    Par défaut

    Bonjour PixelK,

    Tu as une bonne idée, je m'intéresse également à l'astro...

    Voici comment je m'en suis sorti (après de nombreux tests, il y a peut être une autre solution plus performante...Je n'ai pas creusé) :

    1) Récupération des données Live View comme indiqué dans le SDK avec :
    - EdsCreateMemoryStream(0, FluxLiveview)
    - EdsCreateEvfImageRef(FluxLiveView, EvfImage)
    - EdsDownloadEvfImage((Camera, EvfImage)

    2) Récupération de l'image Live View et de sa taille avec :
    - EdsGetPointer(FluxLiveView, ImageData)
    - EdsGetLength(FluxLiveView, ImageSize)
    Puis envoie de l'image dans un buffer en mémoire avec CopyMemory.

    3) Envoie du contenu du buffer dans un JPEG (via un flux)

    Note : FluxLiveview, EvfImage, Camera, ImageData sont des pointeurs (déclarés en type Pointer sous Delphi).

  4. #4
    Membre
    Inscription
    janvier 2008
    Localisation
    France
    Messages
    26
    Boîtier
    Canon EOS 20D ~ EOS 7D
    Objectif(s)
    10-22 f/3.5-4.5 ~ 50 f/1.4 ~ Sigma 18-50 f/2.8 ~ 100 f/2.8 Macro ~ 100-400 f/4.5-5.6

    Par défaut

    J'arrive maintenant à faire le EdsDownloadEvfImage et à en lire les propriétés. Par contre je bloque toujours sur la récupération de l'image LiveView. J'ai mis le projet en pause parce que je me suis fait une petite frayeur : au bout de deux heures d'essais de plus en plus infructueux, plus moyen de reprendre le contrôle manuel du 7D, même après l'avoir éteint rallumé !
    Heureusement tout est rentré dans l'ordre après avoir sortis la batterie quelques secondes.

    Dès que j'ai un peu de courage, je m'y remet.

  5. #5
    Membre
    Inscription
    septembre 2009
    Localisation
    Suisse
    Messages
    27
    Boîtier
    5D III, 7D II
    Objectif(s)
    EF-S 10-22, EF-S 15-85, EF 70-200 f/4

    Par défaut

    Citation Envoyé par pixelk Voir le message
    Bulb
    Lorsque j'envoie kEdsCameraCommand_BulbStart
    20D : Erreur #7 ( EDS_ERR_NOT_SUPPORTED )
    Le 20D ne supporte pas le déclenchement en mode Bulb par le câble.

  6. #6
    Spirt
    Guest

    Par défaut

    Any news about LiveView?

  7. #7
    Membre
    Inscription
    janvier 2008
    Localisation
    France
    Messages
    26
    Boîtier
    Canon EOS 20D ~ EOS 7D
    Objectif(s)
    10-22 f/3.5-4.5 ~ 50 f/1.4 ~ Sigma 18-50 f/2.8 ~ 100 f/2.8 Macro ~ 100-400 f/4.5-5.6

    Par défaut

    Not yet, I postponed this project for the moment.

  8. #8
    Spirt
    Guest

    Par défaut

    It's a pity. I am also working on this problem and very need to solve it ASAP. I have a sample on C++ which works with live view and it seems it has pretty easy code realisation.I Don't know why it's still a problem in delphi. EdsDownloadEvfImage still returns EDS_ERR_INVALID_HANDLE. Any help appreciated.

  9. #9
    Spirt
    Guest

    Par défaut

    I have solved the problem. Soon I'll give You a code if u need. Just need to order it first.

  10. #10
    Membre
    Inscription
    janvier 2008
    Localisation
    France
    Messages
    26
    Boîtier
    Canon EOS 20D ~ EOS 7D
    Objectif(s)
    10-22 f/3.5-4.5 ~ 50 f/1.4 ~ Sigma 18-50 f/2.8 ~ 100 f/2.8 Macro ~ 100-400 f/4.5-5.6

    Par défaut

    Excellent News !
    I'm really interested by your code, thanks in advance.

  11. #11
    Spirt
    Guest

    Par défaut

    A little bit early to celebrate. Got another problem. Here is my code :

    function TCanonCamera.downloadLiveData(Image:TImage) : Boolean;

    var
    evfImage : PEdsEvfImageRef;
    ......

    begin

    ......

    stream := nil;
    Self.LastError := EdsCreateFileStream(
    'LiveData.jpg',kEdsFileCreateDisposition_CreateAlw ays, kEdsAccess_ReadWrite,stream);
    if Self.LastError <> EDS_ERR_OK then
    Exit;

    evfImage:=nil;

    Self.LastError := EdsCreateEvfImageRef(stream, evfImage);
    if Self.LastError <> EDS_ERR_OK then
    begin
    EdsRelease(stream);
    Exit;
    end;

    Self.LastError := EdsDownloadEvfImageLiveView(Self.FRef, evfImage^);
    if Self.LastError <> EDS_ERR_OK then
    begin
    EdsRelease(evfImage);
    EdsRelease(stream);
    Exit;
    end;

    ....

    Result := true;
    end;

    As You can see i redeclared evfImage from EdsEvfImageRef to PEdsEvfImageRef where PEdsEvfImageRef = ^EdsEvfImageRef;

    and

    function EdsDownloadEvfImageLiveView ( inCameraRef : EdsCameraRef;
    inEvfImageRef : PEdsEvfImageRef) : EdsError; stdcall; external edsdk name 'EdsDownloadEvfImage';

    It properly saves liveView data to LiveData.jpg, but after exiting this function TCanonCamera.downloadLiveData(Image:TImage) : Boolean; access violation occurs, so I can take only one frame of LiveView data. Still working on it...
    Dernière modification par Spirt ; 20/06/2010 à 14h13.

  12. #12
    Membre
    Inscription
    janvier 2008
    Localisation
    France
    Messages
    26
    Boîtier
    Canon EOS 20D ~ EOS 7D
    Objectif(s)
    10-22 f/3.5-4.5 ~ 50 f/1.4 ~ Sigma 18-50 f/2.8 ~ 100 f/2.8 Macro ~ 100-400 f/4.5-5.6

    Par défaut

    I seems I'm unable to replicate the download of the liveview image on my 7D (the jpeg file is 0ko and I get the same access violation at the end of downloadLiveData.

    Could you please post the full function to a site like Pastebin.com - #1 paste tool since 2002! (it preserves the formating) ?

  13. #13
    Spirt
    Guest

    Par défaut

    Somethimes I also get jpeg file is 0k after access violations. Don't know what it depends on. Try switch off/on your camera.
    Tomorrow I'll give your all code. I am in a hurry.

  14. #14
    Membre
    Inscription
    janvier 2008
    Localisation
    France
    Messages
    26
    Boîtier
    Canon EOS 20D ~ EOS 7D
    Objectif(s)
    10-22 f/3.5-4.5 ~ 50 f/1.4 ~ Sigma 18-50 f/2.8 ~ 100 f/2.8 Macro ~ 100-400 f/4.5-5.6

    Par défaut

    Here is my version of the fonction, no error and valid liveview jpeg : Delphi | function TCanonCamera.Download - Pk - 25KXhhQw - Pastebin.com

  15. #15
    Spirt
    Guest

    Par défaut

    Citation Envoyé par pixelk Voir le message
    Here is my version of the fonction, no error and valid liveview jpeg : Delphi | function TCanonCamera.Download - Pk - 25KXhhQw - Pastebin.com
    Still access violation The difference is now it occures in parent function.

    procedure TFormPhoto.continueRecClick(Sender: TObject);
    .....
    .....

    Camera.downloadLiveData(); <---- Works Fine


    Any code after call of this function gives access violation. Do You have the same problem?
    Dernière modification par Spirt ; 20/06/2010 à 16h45.

  16. #16
    Membre
    Inscription
    janvier 2008
    Localisation
    France
    Messages
    26
    Boîtier
    Canon EOS 20D ~ EOS 7D
    Objectif(s)
    10-22 f/3.5-4.5 ~ 50 f/1.4 ~ Sigma 18-50 f/2.8 ~ 100 f/2.8 Macro ~ 100-400 f/4.5-5.6

    Par défaut

    Here is my full Source CCCp 0.0.17.



    Works fine with my 7D, on battery or on AC power, on two different computers, usin SDK 2.7 (I know that 2.8 is out, but for now, 2.7 works)

  17. #17
    Spirt
    Guest

    Par défaut

    It works! Thank You very much!!!

  18. #18
    Membre
    Inscription
    janvier 2008
    Localisation
    France
    Messages
    26
    Boîtier
    Canon EOS 20D ~ EOS 7D
    Objectif(s)
    10-22 f/3.5-4.5 ~ 50 f/1.4 ~ Sigma 18-50 f/2.8 ~ 100 f/2.8 Macro ~ 100-400 f/4.5-5.6

    Par défaut

    Thank you Spirt for publishing your findings !

    Now, the next level, get the liveview in a memory stream, to be able to display it with a high refresh rate.
    I will also try to drive the focus motor in LiveView.

    I'm working on it right now.

  19. #19
    Membre
    Inscription
    janvier 2008
    Localisation
    France
    Messages
    26
    Boîtier
    Canon EOS 20D ~ EOS 7D
    Objectif(s)
    10-22 f/3.5-4.5 ~ 50 f/1.4 ~ Sigma 18-50 f/2.8 ~ 100 f/2.8 Macro ~ 100-400 f/4.5-5.6

    Par défaut

    An here is a very dirty state (no time to clean the source right now) with working focus control and LiveView Zoom (but still no LiveView directly to memory stream) :
    CCCp 0.0.20 BETA

  20. #20
    Spirt
    Guest

    Par défaut

    Citation Envoyé par pixelk Voir le message
    An here is a very dirty state (no time to clean the source right now) with working focus control and LiveView Zoom (but still no LiveView directly to memory stream) :
    CCCp 0.0.20 BETA
    Bonjour pixelk. What do You meant under LiveView zoom? I have a manual zoom on my EOS 1000D and when I a adjust it liveview picture is also zooming...
    By the way I compared my yesterday's unworking code with your .17 version code (I mean DownloadLiveView function) and didn't find any serious differences except of variables names. So I really don't understand why it didn't work.
    Soon I'll also try to finish with liveView MemoryStream data send. If You will make it first please post the code here. Thank You

 

 
Page 1 sur 3 123 DernièreDernière

Informations de la discussion

Utilisateur(s) sur cette discussion

Il y a actuellement 1 utilisateur(s) naviguant sur cette discussion. (0 utilisateur(s) et 1 invité(s))

Règles de messages

  • Vous ne pouvez pas créer de nouvelles discussions
  • Vous ne pouvez pas envoyer des réponses
  • Vous ne pouvez pas envoyer des pièces jointes
  • Vous ne pouvez pas modifier vos messages
  •  
Fuseau horaire GMT +1. Il est actuellement 09h48.
Powered by vBulletin® Version 4.2.5
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.
Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Auto Closing Of Threads provided by Threads Auto Close (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Copyright © Eos-numerique 2004-2023
vBulletin Skin By: PurevB.com