电子邮件:flashindream[AT]gmail[DOT]com
兴趣:天文.AS3............................
基于Python for S60的自动导星程序(四)
Post by indream, 2010-3-10, Views:今天又用手机导星系统拍了10几张照片,只有两张尚可,这两张均为天狼星作导星,用猎户座episode星(1.7等)做导星基本上有不规则运动.
除了导星的亮度问题还有一个是机械问题,好几次是因为相机在球台上滑动了位置,另外一个问题是程序自动关闭,初步判断是电量变化提醒造成的
600秒,镜头焦距210mm@f22,iso100

M41,600秒,镜头焦距210mm@f22,iso100

手机导星工作照

正面
基于Python for S60的自动导星程序(三)
Post by indream, 2010-3-9, Views:很久没有在南方的三月份看见下雪了,这次冷空气也带来了久违的晴天.下班回家后就开始把flash版的自动导星程序移植到python,没花多少时间把程序调试运行在手机上.
终于到了实际拍摄验证效果的时刻.目标依旧是天狼星
依次拍了60秒(F8),180秒(F22),900秒(F22),ISO均是100,镜头焦距135mm,机身EOS 300D,手机N6120C,赤道仪LXD75(朝南卧室,没有对极轴,仅通过指南针估计一下方向)
图像均为RAW转JPG,100%裁切

60秒

180秒

900秒

最后一张是手机在第一次拍900秒到一半的时候,程序自动退出
基于Python for S60的自动导星程序(二)
Post by indream, 2010-3-6, Views:手机键盘在使用viewfinder的时候不能用keyEvent检测,从pycamera的例子找到利用viewfinder.getEvents()方法获取键盘按下事件的检测
for ev in viewfinder.getEvents():
keyHandleEvent(ev)
星点中心的判断,是通过灰度最大值来确定高亮区的中心位置,程序如下
maxY=0
posx = 0;
posy = 0;
p255 = math.pow(255,5)
for i in xrange(0,aCols):
line=0
for j in xrange(0,aRows):
(r,g,b) = Image.GetPixel(i,j)
gy=(r * 0.30 + g * 0.59 + b * 0.11);
line+=math.pow(gy,6)/p255
if maxY<line:
maxY = line
posx = i
maxX=0
for i in xrange(0,aRows):
line=0
for j in xrange(0,aCols):
(r,g,b) = Image.GetPixel(j,i)
gy=(r * 0.30 + g * 0.59 + b * 0.11);
line+=math.pow(gy,6)/p255
if maxX<line:
maxX = line
posy = i
基于Python for S60的自动导星程序(一)
Post by indream, 2010-3-3, Views:从irxon购入一个bt5701的蓝牙串口,今天到了.刚到家就迫不及待开始写手机蓝牙通讯的代码.
import appuifw
import socket
import e32
def bt_connect():
global sock
sock=socket.socket(socket.AF_BT,socket.SOCK_STREAM)
target=''
if not target:
address,services=socket.bt_discover()
print "Discovered: %s, %s"%(address,services)
if len(services)>1:
import appuifw
choices=services.keys()
choices.sort()
choice=appuifw.popup_menu([unicode(services[x])+": "+x for x in choices],u'Choose port:')
target=(address,services[choices[choice]])
else:
target=(address,services.values()[0])
print "Connecting to "+str(target)
sock.connect(target)
print "OK."
bt_typetext()
def bt_typetext():
global sock
test = appuifw.query(u"Type words", "text", u"")
if test == None:
exit_key_handler()
else:
sock.send(test)
bt_typetext()
def exit_key_handler():
script_lock.signal()
appuifw.app.set_exit()
appuifw.app.title = u"bt mob to PC"
script_lock = e32.Ao_lock()
appuifw.app.exit_key_handler = exit_key_handler()
bt_connect()
script_lock.wait()
依次发送指令(区分大小写)给LXD75
:RM#
:Ms#
:Qs#
成功实现16倍速,向南转动,向南转动停止
Python for S60开发入门
Post by indream, 2010-2-28, Views:(1)Python for S60是Python在Nokia S60平台上的解释器,功能相对于flash要强大,比java开发更简单
PyS60安装文件可以在http://sourceforge.net/projects/pys60/files/
需要安装2个文件,PythonScriptShell.SIS和PythonForS60.SIS
如果不需要在PC模拟调试的话,可以用记事本写好脚本直接放手机Python文件夹运行,作者一般是用nokia的pc套装连接手机进行程序调试
手机上也有个python编辑器叫PED,http://code.google.com/p/ped-s60/
(2)NokiaCV LIB是Nokia为Symbian平台提供的开源图像处理扩展库 http://research.nokia.com/research/projects/nokiacv
下载安装NokiaCV for python,
ncvlib11.rar
pyncvlib11.rar
(3)补充一个lightblue是Python蓝牙API
http://lightblue.sourceforge.net/
sis,sisx安装时如果提示证书过期,请先调小手机日期年份到2009年再安装
我的目标是手机摄像头采集图像->python处理图像->通过蓝牙发送命令控制外部蓝牙串口,就差蓝牙控制的程序验证了
黄河三角洲二十年变迁(1989-2009)
Post by indream, 2010-2-25, Views:1989

1995

1999

2004

2009

China’s Huang He (Yellow River) is the most sediment-filled river on Earth. Flowing northeast to the Bo Hai Sea from the Bayan Har Mountains, the Yellow River crosses a plateau blanketed with up to 300 meters (980 feet) of fine, wind-blown soil. The soil is easily eroded, and millions of tons of it are carried away by the river every year. Some of it reaches the river’s mouth, where it builds and rebuilds the delta.
The Yellow River Delta has wandered up and down several hundred kilometers of coastline over the past two thousand years. Since the mid-nineteenth century, however, the lower reaches of the river and the delta have been extensively engineered to control flooding and to protect coastal development. This sequence of natural-color images from NASA's Landsat satellites shows the delta near the present river mouth at five-year intervals from 1989 to 2009.
Between 1989 and 1995, the delta became longer and narrower along a southeast-bending arc. In 1996, however, Chinese engineers blocked the main channel and forced the river to veer northeast. By 1999, erosion and settling along the old channel caused the tip of the delta to retreat, while a new peninsula had formed to the north.
The new peninsula thickened in the next five-year interval, and what appears to be aquaculture (dark-colored rectangles) expanded significantly in areas south of the river as of 2004. By 2009, the shoreline northwest of the new river mouth had filled in considerably. This may be the outcome that the engineers were anxious to achieve: the land northwest of the newly fortified shoreline is home to an extensive field of oil and gas wells. Their protection is a primary concern.
Although levees, jetties, and seawalls allow officials to slow erosion and direct the flow of the river, other challenges to protecting the delta’s natural wetlands and its agricultural and industrial development remain. Water and sediment flows to the delta have declined dramatically since the 1970s, due to both reduced rainfall and explosive urban and agricultural demand for water upstream. In the 1990s, the river frequently ran dry well before reaching the delta.
These low- and no-flow periods are a huge problem in the lower reaches of the river and the delta. They severely damage wetlands and aquaculture and worsen the river’s already severe water pollution problem. Ironically, they also increase the flood risk because when flows are low, sediment fills in the riverbed. The river becomes shallower and higher in elevation. In places, the river is already perched above the surrounding floodplain by as much as 10 meters (30 feet). A levee breach during a high water event could be devastating.
91kge(就要K歌)
Post by indream, 2010-2-7, Views:云南星空之旅
Post by indream, 2010-1-23, Views:2010.01.15日环食
Post by indream, 2010-1-18, Views:代卖薪女赠诸妓
Post by indream, 2010-1-12, Views:乱篷为鬓布为巾,
晓踏寒山自负薪。
一种钱塘江畔女,
著红骑马是何人?
唐代的妓地位大致相当于日本的艺妓,熟谙音律,很多对一些乐器十分精通,一般人是不能请她们去赴宴的,她们是白居易杭州太守的座上课,并随从达官贵人闲游,承应宴会与游玩之时,这些女妓皆可以骑马以从。
这首诗比较妙。晓踏寒山,从早上起就去到山中,一天幸苦,赴宴乐之诸妓,骑马而至,马就相当于现在的名车。一种如驴负薪,乱篷为鬓布为巾,一种著红骑马,歌舞流连钱塘江畔。
Hot Articles
Friend Connect
New Articles
- [03/10]基于Python for S60的自动导星程序(四)
- [03/09]基于Python for S60的自动导星程序(三)
- [03/06]基于Python for S60的自动导星程序(二)
- [03/03]基于Python for S60的自动导星程序(一)
- [02/28]Python for S60开发入门
- [02/25]黄河三角洲二十年变迁(1989-2009)
- [02/07]91kge(就要K歌)
- [01/23]云南星空之旅
- [01/18]2010.01.15日环食
- [01/12]代卖薪女赠诸妓
- [12/21]冬季天荒坪
- [12/18]摩尔码转换
- [11/29]2009上海马拉松
- [11/27]lxd75赤纬轴改单轴赤道仪
- [11/23]LX200串口命令(JAVA描述)
Archives
- 2010 March (4)
- 2010 February (3)
- 2010 January (3)
- 2009 December (2)
- 2009 November (7)
- 2009 October (8)
- 2009 September (6)
- 2009 August (11)
- 2009 July (9)
- 2009 June (2)
- 2009 May (9)
- 2009 April (8)
- 2009 March (6)
- 2009 January (2)
- 2008 December (6)
- 2008 November (4)
- 2008 October (1)
- 2008 August (3)
- 2008 July (2)
- 2008 June (9)
- 2008 May (8)
- 2008 April (20)
- 2008 March (4)
- 2008 January (1)
- 2007 December (3)
- 2007 November (7)
- 2007 October (6)
- 2007 September (1)
- 2007 August (10)
- 2007 July (11)
- 2007 June (5)
- 2007 April (4)
- 2007 March (10)
- 2007 February (4)
- 2007 January (10)
- 2006 December (17)
- 2006 November (11)
- 2006 October (6)
- 2006 September (19)
- 2006 August (22)
Favorite
Statistics
- 文章总数:288
- 评论总数:190
- 引用总数:0
- 浏览总数:133
- 留言总数:1
- 当前主题:sean
- 当前样式:Sean_Sim





Links