我有一个非常嘈杂的图像,小(相关部分是381×314),功能非常微妙.

源图像和裁剪的相关区域也在这里:http://imgur.com/a/O8Zc2
任务是使用Python计算相关区域内的白点数,但我很高兴只是隔离区域内较亮的点和线并删除背景结构(在这种情况下是单元格).
使用OpenCV我尝试过直方图均衡(破坏细节),找到轮廓(不起作用),使用颜色范围(颜色太近了?)
有关其他事情的任何建议或指导可以尝试吗?我不相信我可以得到更高的res图像,所以这个任务可能与相当困难的来源?
opencv image-processing image-recognition edge-detection noise-reduction
我有一个非常简单的程序,检查日期和返回,如果合并的月+日+年是一个所谓的快乐数字(一个数字的平方和等于一的数字)或不.
当我通过python本地运行程序时,程序运行正常,但是当我尝试通过appengine运行它时,无论是本地还是在线,都没有显示任何内容,只有一条TEST打印行.
我无法弄清楚为什么appengine不会显示该功能.
任何帮助或建议都会非常感激,因为我被困住了.
appengine日志显示GET请求:
" INFO 2011-04-14 18:19:14,981 dev_appserver.py:3317] "GET / HTTP/1.1" 200 -"
Run Code Online (Sandbox Code Playgroud)
但事后没有.
import sys
import datetime
def main():
date = datetime.date.today()
datearray=[0,0,0]
datearray[0]=str(date.month)
datearray[1]=str(date.day)
datearray[2]=str(date.year)
joined = ''.join(datearray)
print "Date:",int(joined)
print happynums(int(joined))
def happynums(num):
total = int(num)
varnum = 0
bin=0
x=0
past=set()
while total!=1:
if total in past:
return "Sad day :("
past.add(total)
list = map(int,str(total))
total=0
for i in list:
total = total + i**2
if total==1:
return "Happy day …Run Code Online (Sandbox Code Playgroud) 我在安装模块时遇到了很多麻烦.起初我以为我在mac os x上搞砸了我的python安装但是我安装了一个虚拟机和ubuntu 11.04并且遇到了类似的麻烦.为什么os x和ubuntu都失败了同样的错误?
例如,我无法安装tkinter失败:
Installing collected packages: tkinter-pypy
Running setup.py install for tkinter-pypy
building '_tkinter' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DWITH_APPINIT -I/usr/include/tcl -I/usr/include/tk -I/usr/include/python2.7 -c src/_tkinter.c -o build/temp.linux-i686-2.7/src/_tkinter.o
src/_tkinter.c:74:17: fatal error: tcl.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools;__file__='/home/pfm/build/tkinter-pypy/setup.py';execfile(__file__)" install --single-version-externally-managed --record /tmp/pip-sMB5Wi-record/install-record.txt:
running install
running build
running build_ext
building '_tkinter' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG …Run Code Online (Sandbox Code Playgroud)