processing

How to convert pixels to gray scale?

旧城冷巷雨未停 提交于 2019-12-09 17:04:42
问题 Ok, I am using Processing which allows me to access pixels of any image as int[] . What I now want to do is to convert the image to gray-scale. Each pixel has a structure as shown below: ...........PIXEL............ [red | green | blue | alpha] <-8--><--8---><--8--><--8--> Now, what transformations do I need to apply to individual RGB values to make the image gray-scale ?? What I mean is, how much do I add / subtract to make the image gray-scale ? Update I found a few methods here: http://www

Mysql安装、配置、优化

一个人想着一个人 提交于 2019-12-09 16:52:56
Mysql安装、配置、优化 MySQL是一个关系型数据库管理系统,MySQL是最好的 RDBMS (Relational Database Management System,关系数据库管理系统) 应用软件之一。 下载Mysql 1、通过网址https://dev.mysql.com/downloads/mysql/下载mysql 一、Mysql安装 普通安装及环境配置 使用yum进行mysql的安装 1、输入 yum list | grep mysql 命令 [root@iZbp19m6s0kz1ktg5okuauZ ~]# yum list | grep mysql 查看yum服务器上mysql数据库的可下载版本信息 [root@iZbp19m6s0kz1ktg5okuauZ ~]# yum list | grep mysql akonadi-mysql.x86_64 1.9.2-4.el7 base apr-util-mysql.x86_64 1.5.2-6.el7 base calligra-kexi-driver-mysql.x86_64 2.9.10-2.el7 epel collectd-mysql.x86_64 5.8.1-1.el7 epel dmlite-plugins-mysql.x86_64 1.13.2-2.el7 epel dovecot-mysql

natural language processing

孤街醉人 提交于 2019-12-09 15:59:50
基于python 自然语言处理工具包 :NLPT(natural language processing toolkit) ,安装时 sudo pip -U install nltk NLPT的网址 Natural language processing toolkits Name Language License Creators Website Apertium C++ , Java GPL (various) [1] Deeplearning4j Java , Scala Apache 2.0 Adam Gibson, Skymind [2] DELPH-IN LISP , C++ LGPL , MIT , ... Deep Linguistic Processing with HPSG Initiative [3] Distinguo C++ Commercial Ultralingua Inc. [4] General Architecture for Text Engineering (GATE) Java LGPL GATE open source community [5] Gensim Python LGPL Radim Řehůřek [6] LinguaStream Java Free for research University of Caen ,

How to read oni file in Processing 2?

流过昼夜 提交于 2019-12-09 13:53:13
问题 I have a Kinect program in Processing 2 that I would like to test or simulate by passing it saved skeletons from an .oni file rather than taking input from the Kinect. Is it possible to do this, i.e. to get Processing 2 instead of using the Kinect it should read values from the .oni file and produce an output? 回答1: I recommend using the SimpleOpenNI library: import SimpleOpenNI.*; SimpleOpenNI ni; void setup(){ size(640,480); ni = new SimpleOpenNI(this); if(SimpleOpenNI.deviceCount() == 0) ni

Every permutation of the alphabet up to 29 characters?

有些话、适合烂在心里 提交于 2019-12-09 07:00:04
问题 I'm attempting to write a program that will generate a text file with every possible permutation of the alphabet from one character up to twenty-nine characters. I've chosen 29 as the longest English word that everyone knows is antidisestablishmentarianism which is 28 characters in length. There are longer ones, but they are mainly very technical and obscure. I realise this will generate a huge number of strings. However I've no idea where to start or even how to figure out how many

how to extrude a path in 3d?

99封情书 提交于 2019-12-09 04:41:09
问题 I'm trying to extrude a path in 3d. Nothing fancy yet, just following some points and using a regular polygon for 'tubing'. I'm using Processing for now to quickly prototype, but will later turn the code into OpenGL. My problem is rotating the 'joints' at the right angles. I think I have a rough idea how to get the angles, not sure. I've started from a sample by Simon Greenwold(Processing > File > Examples > 3D > Form > Vertices).Here's my attempt so far: UPDATE > REFACTORED/SIMPLIFIED CODE

java.lang.UnsatisfiedLinkError: jssc.SerialNativeInterface.getSerialPortNames()

邮差的信 提交于 2019-12-08 14:39:54
问题 I'm doing a processing based project with eclipse and Procliping. When I'm testing the project with "Run" command inside the IDE, everything works fine. But if I export it into a runable-jar, when I run the jar it'll give this error on the line String[] li=Serial.list(); . Any idea what's going wrong? Java source attachment is "processing-2.2.1/modes/java/libraries/serial/src" And here is a sample code: package abcd; import processing.core.PApplet; import processing.serial.Serial; public

CentOS 环境下搭建svn服务器

心不动则不痛 提交于 2019-12-08 13:52:24
第一、安装svn程序, yum install -y subversion (rmp -ql subversion 查看安装位置 svnserve --version 查看安装的版本) [root@iZ25gd15vigZ ~]# yum install subversion Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile epel/metalink | 6.4 kB 00:00 * base: mirrors.yun-idc.com * epel: mirrors.yun-idc.com * extras: mirrors.yun-idc.com * rpmforge: mirrors.neusoft.edu.cn * updates: mirrors.yun-idc.com base | 3.7 kB 00:00 epel | 4.4 kB 00:00 extras | 3.3 kB 00:00 rpmforge | 1.9 kB 00:00 updates | 3.4 kB 00:00 updates/primary_db | 5.3 MB 00:00 Setting up Install Process Resolving Dependencies --> Running

How can i use chrome webcam API and the processing.js to manipulate the video?

一笑奈何 提交于 2019-12-08 11:48:14
问题 As topic, I want to play with the webcam and chrome webcam API comes in handy, no plugin is needed. However, I am not familiar with javascript syntax, so I still want to use processing.js to manipulate the video. So how should the code be like? GetUserMedia in the canvas,then? How can i tell the processing.js that there is a video in the canvas? import processing.video should not work because it is processing.js instead of processing. 回答1: According to this: https://github.com/austinhappel

Processing OBJ extract vertex

半腔热情 提交于 2019-12-08 10:36:03
问题 How can i get, and print vertex of an OBJ on processing? PShape x; void setup(){ size(600,600,P3D); x = loadShape("x.obj"); } void draw(){ for (int i = 0; i < x.getVertexCount(); i++) { PVector v = x.getVertex(i); translate(width/2,height/2); shape(x,0,0); } } 回答1: I recommend first having a look at the OBJ format and at your mesh.(More details on Paul Bourke's site) You should be able to easily inspect the topology using a free 3D editor (such as Blender, Wings3D, etc.). (e.g. mesh ->