S
H
A
R
E
Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Thursday, April 19, 2012

haarcascade porn and breast detection

I have two haarcascade for nude image detection, first is for breast detection, and for porn (nude) image detection.
Haarcascade for porn image detection, accuarate just 40%-50%, still have many false detection, but you can use for detecting a nude image. created by Indonesian people.
And haarcascade for breast detection, it have 70%-80% accuration. i don't know who made it, but i got it from Hackchina source code search engine.
now you can make your OpenCV to detecting a nude image by using this haarcascades. but you need for create a skin color detection algorithm for make detection more accurate! i will share for skin color detection algorithm in the next moment.

Read More!

Sunday, March 11, 2012

Netbeans Slow When starting

I using : Netbeans 7.1
OS : win 7 32 Ultimate
CPU: core-i5
RAM: 2G
VGA: 4G
I dont know why my Netbeans its running slow when started, make my cursor slow too.

Then I know why, its may a Netbeans bug. Netbeans / Java have some speed problems where implementing fonts from the OS manchine.

 its simple, try to restore Font & color setting in your nertbeans, then restart.. may its done..,

Read More!

Saturday, February 11, 2012

Java Execute Console Process and Get Output

To execute process you can use ProcessBuilder, like this:

ProcessBuilder pb = new ProcessBuilder("tasklist").redirectErrorStream(true);

use redirectErrorStream to make the BufferedReader can read if error message is returned.

Now, get the Process by executing it:
Process p = pb.start();
  
Then make a BufferedReader that can read the console output screen:
BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));

You can read the respond of console process by using while loop like this:

while((str = br.readLine()) != null){
    retVal += str;
}

Here is the complete java function:

Read More!

Friday, April 08, 2011

Java. Compile & Run Using Command Prompt

This a sample code, save as "app1.java":

public class app1 {
public static void main(String arg[]){
    System.out.println("Haiii haha.. \nThis Ur Java Code");
}
}


This Compiler created from cmd, save as "java_Compile&Run.cmd":

set c=C:\Program Files\Java\jdk1.6.0_23\jre\lib\rt.jar
echo off & cls
javac -Xbootclasspath:"%c%" -classpath . app1.java
java -Xbootclasspath:"%c%" -classpath . app1
pause
rem klampok_child@yahoo.co.id

Place app1.java & java_Compile&Run.cmd in one folder, and double click the cmd file (execute) and see it.
javac is the main java compiler, java is interprenter to running java program (byte-code).
Have problem, please read it:
>  Make sure you have jdk1.6.0_23 installed on your windows
>  Make sure you was write java code correctly (its case-sensitive)

Try it :-)
Read More!