下面是一个有效的解决方案,使用python3.5(通过Anaconda安装),顺便说一句

ISO和快门的参数是硬连线的,但是如果你需要的话,这应该可以让你继续工作。在import sys

import os

import subprocess

import datetime

def func_TakeNikonPicture(input_filename):

camera_command = 'C:\Program Files (x86)\digiCamControl\CameraControlCmd.exe'

camera_command_details = '/filename ./' + input_filename + ' /capture /iso 500 /shutter 1/30 /aperture 1.8'

print('camera details = ',camera_command_details)

full_command=camera_command + ' ' + camera_command_details

p = subprocess.Popen(full_command, stdout=subprocess.PIPE, universal_newlines=True, shell=False)

(output, err) = p.communicate()

#This makes the wait possible

p_status = p.wait(1)

# print(p.stdout.readline())

#This will give you the output of the command being executed

print('Command output: ' + str(output))

print('Command err: ' + str(err))

print('done')

if(len(sys.argv) < 2):

rawimagename = 'test.jpg'

else:

# sys.argv[0] is the program name, sys.argv[1] is the first file, etc.

# need to shift this over

files = sys.argv[1:len(sys.argv)]

# Read the image

rawimagename = files[0]

if(os.path.isfile(rawimagename) is True):

print("File exists...not overwriting.")

sys.exit()

# Store date/time for file uniqueness

current_dt=datetime.datetime.now().strftime('%Y%m%d_%H%M%S')

print("Current date time = " + current_dt)

rawimagename=current_dt + '_' + rawimagename

print('Name of raw image will be: ', rawimagename)

# take picture

func_TakeNikonPicture(rawimagename)

python control_使用digicamcontrol使用Python控制尼康相机?相关推荐

  1. 孤荷凌寒自学python第三十八天初识python的线程控制

    孤荷凌寒自学python第三十八天初识python的线程控制 (完整学习过程屏幕记录视频地址在文末,手写笔记在文末) 一.线程 在操作系统中存在着很多的可执行的应用程序,每个应用程序启动后,就可以看着 ...

  2. python颜色识别原理_电脑控制手机 Python实现颜色识别功能

    原标题:电脑控制手机 Python实现颜色识别功能 用电脑控制手机好几年了,Total Control作为安卓手机的多控系统,是我用过各方面都比较稳定的一款软件了.通过脚本实现识别颜色是其强大功能之一 ...

  3. python中调用adb命令来控制手机

    前言 如今python是非常多人学习的,而手机也几乎人手一部.对于很多Python学习者,想用python来完成android手机中各种炫酷的的控制,adb是必不可缺少的工具之一.比如17年末大热的微 ...

  4. python人工智能【隔空手势控制鼠标】“解放双手“

    大家好,我是csdn的博主:lqj_本人 这是我的个人博客主页: lqj_本人的博客_CSDN博客-微信小程序,前端,python领域博主lqj_本人擅长微信小程序,前端,python,等方面的知识h ...

  5. python通过键盘方向键移动_移动python教程!python中怎么用键盘方向键控制方块的移动...

    python中怎么用键盘方向键控制方块的移动 感象是在用TKinter绘图.在tkinter里有一键射表.左键也在其中. KeyPress-xx 这个xx是键盘的号码.不在button.tcl里.需己 ...

  6. python:warnings —— 警告信息的控制

    python:warnings -- 警告信息的控制 警告类别 通常以下情况会引发警告:提醒用户注意程序中的某些情况,而这些情况(通常)还不值得触发异常并终止程序.例如,当程序用到了某个过时的模块时, ...

  7. Python实现 通过RS232 SCPI 命令控制Tektronix DMM4050

    Python实现 通过RS232 SCPI 命令控制Tektronix DMM4050@TOC import serial import matplotlib.pyplot as plt import ...

  8. python基于yolov3实现的手势控制音乐播放器

    python基于yolov3实现的手势控制音乐播放器 效果演示 总体框架 手势识别模块 音乐播放器模块 一个小总结吧 效果演示 话不多说,先上最后的成品展示. python基于yolov3实现的手势控 ...

  9. python的代码块使用什么控制类、函数以及其他逻辑判断_一篇文章教会你什么是Python模仿强类型...

    前言 Hi,各位小伙伴,你们好,今天我们来说一个Python未来趋势的并且一个好玩的东西. 我们可能多多少少都听过一句话,动态一时爽,重构火葬场.从生产角度出发,Python确实是一门很优秀的语言,但 ...

最新文章

  1. AAAI 2020 | 滴滴东北大学提出自动结构化剪枝压缩算法框架,性能提升高达120倍...
  2. 有没有办法折叠Eclipse中的所有代码块?
  3. 2020年12月大学英语四六级英语作文预测(XDF王江涛)
  4. java网格画线_java 网格输出的类--练习 stream
  5. javax.el.ELException: Provider com.sun.el.ExpressionFactoryImpl not found
  6. h5应用数据加密_邦伲德H5场景个性化开发,打破传统营销局限
  7. php yii model,Yii模型
  8. Java 8中的新BigInteger方法
  9. Flink 1.11 SQL 十余项革新大揭秘,哪些演变在便捷你的使用体验?
  10. leetcode51. N皇后
  11. Uniswap 24小时交易量9.7亿美元,占以太坊上Dex总量的54%
  12. POJ 2104 划分树
  13. 配置Https 和 HSTS
  14. indesign使用教程,如何将图形添加到项目?
  15. JAVA 基础语法(六)——方法(函数)
  16. A88xm-plus 主板采用Clover实现 m2 固态硬盘启动
  17. cad转excel插件c2e_CAD表格互转EXCEL插件
  18. 生成专题2 | 图像生成评价指标FID
  19. python实现离散沃尔什变换_【图像处理】沃尔什变换与 python 实现
  20. 2021年过了大半了,脑机接口取得哪些进展?

热门文章

  1. proteus pro 8.9 汉化安装教程
  2. JMU20软件专业 软件工程(老师划重点)
  3. 计算机应用基础的课程讨论,计算机应用基础教学探讨
  4. mysql 添加列_mysql中添加列、修改列、删除列的方法
  5. 存储过程报错ERROR 117242000 - Result consisted of more than one row
  6. 手把手教你拿下空间复杂度【下】(超详细)
  7. 正事难起头 歪事防起头
  8. js屏蔽掉调试时写的console.log
  9. 店铺淘客是什么?新手该如何避免违规扣分,店铺该如何才能达到日出百单?...
  10. 1.10 Pet技术流导论+完全1.10Pet数据(转)