processing

How to determine the distance between upper lip and lower lip by using webcam in Processing?

你说的曾经没有我的故事 提交于 2019-12-23 02:18:25
问题 Where should I start? I can see plenty of face recognition and analysis using Python, Java script but how about Processing ? I want to determine the distance by using 2 points between upper and lower lip at their highest and lowest point via webcam to use it in further project. any help would be appreciated 回答1: If you want to do it in Processing alone you can use Greg Borenstein's OpenCV for Processing library: You can start with the Face Detection example Once you detect a face, you can

SqLite Multicore Processing

落花浮王杯 提交于 2019-12-22 13:52:33
问题 How do you configure SqLite 3 to process a single query using more than 1 core of a CPU ? 回答1: Since version 3.8.7, SQLite can use multiple threads for parallel sorting of large data sets. 回答2: sqlite3 itself does not do that. However, I have a project called multicoresql on github that has utility programs and a C library for spreading sql queries onto multiple cores. It uses sharding so you have to break your large database or datafile into multiple sqlite3 database files. A single SQL

How to enable VSync synchronization in processing 2.x?

旧街凉风 提交于 2019-12-21 21:39:41
问题 Previously, in processing 1.x, I used the following code to enable VSync synchronization: void enableVSync() { frameRate(-1); GL pgl = (PGraphicsOpenGL)g; gl = pgl.beginGL(); gl.setSwapInterval(1); pgl.endGL(); } This does not work in processing 2.x and I can't seem to find out how or even if it is supposed to work in processing 2.x. Edit: By switching from size(500, 500); to size(500, 500, P2D); , it seems to help. It now looks like processing does all the drawing in a back buffer and

Unable to sync computer time to Arduino via USB

白昼怎懂夜的黑 提交于 2019-12-21 09:23:20
问题 I want to sync the Time from my pc to the arduino. I am using their Time library but it does not work. How can I get the arduino to have the same time as on my computer ? I am currently using a mac. Their documentations says : On a unix system, you can set the time with the shell command: TZ_adjust=-8; echo T$(($(date +%s)+6060$TZ_adjust)) > /dev/tty.usbserial-A8008pym I tried on the terminal >export TZ_adjust=-8; echo T$(($(date +%s)+6060$TZ_adjust)) > /dev/tty.usbmodemfd131 and I get

How do you use Processing for Android to display a stereoscopic image in a Google Cardboard device?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 05:45:29
问题 Processing was designed to make drawing with Java much easier. Processing for Android has the power of its desktop sibling plus information from sensors. Putting these things together, shouldn't it be easy to display a stereoscopic image and move around it like Oculus Rift or Google Cardboard? 回答1: The code below displays an image in two viewports - one for the left eye and one for the right eye. The result is that the image looks 3D when viewed from a Google Cardboard device. Accelerometer

Value Remapping

↘锁芯ラ 提交于 2019-12-20 09:36:32
问题 Processing has a great function I use all the time: map(value, low1, high1, low2, high2) http://processing.org/reference/map_.html It remaps value (that has an expected range of low1 to high1 ) into a target range of low2 to high2 ). I want to understand the math behind it so I can use it in other languages. Anyone want to throw me a bone and help me reverse engineer it? I understand that it's a lerp that's been re-scaled and re-offset... feeling brain dead this morning. 回答1: From your

How to re-order units based on their degree of desirable neighborhood ? (in Processing)

寵の児 提交于 2019-12-20 08:48:09
问题 I would need help to implement an algorithm allowing the generation of building plans, that I've recently stumbled on while reading Professor Kostas Terzidis' latest publication: Permutation Design: Buildings, Texts and Contexts (2014). CONTEXT Consider a site (b) that is divided into a grid system (a). Let's also consider a list of spaces to be placed within the limits of the site ( c ) and an adjacency matrix to determine the placement conditions and neighboring relations of these spaces (d

openFrameworks vs Processing

坚强是说给别人听的谎言 提交于 2019-12-20 08:39:22
问题 I have been reading a lot about openFrameworks and Processing, But still can't make the distinction other than one is in C++ and the other in Java. Can someone tell me which is for what exactly? 回答1: You are correct, one is C++ and the other is Java, and those differences apply to these frameworks, so it's up to your preferences/project scope to decide which one is best for you. With Processing : You get a minimal IDE, but can easily use Eclipse or other Java IDEs. You get memory management

Calculate ellipse size in relation to distance from center point

拜拜、爱过 提交于 2019-12-20 06:18:01
问题 I want to achieve a slow fade in size on every collapse into itself. In other words, when the circle is at its biggest, the ellipses will be at the largest in size and conversely the opposite for the retraction. So far I am trying to achieve this affect by remapping the cSize from the distance of the center point, but somewhere along the way something is going wrong. At the moment I am getting a slow transition from small to large in ellipse size, but the inner ellipses are noticeably larger.

Class “Nebula” does not exist

喜欢而已 提交于 2019-12-20 05:25:14
问题 I am having issues with Processing 3.3. I am just starting on a type of nebula simulator, meant to simulate the birth and life cycle of a star from a nebula to red giant. I have created two classes so far: Gas, for each individual gas particle, and Nebula, referring to the collection of particles. I have typed in the following code to the editor with the same result each time: 'Class "Nebula" does not exist.' My code, drastically simplified, is as follows: Gas: class Gas { /* variables,