2016-05-31 11:10:08 -0600
| commented question | Data is not inserted into the database .. i'm using oracle database .. actually i try diff things but dont know what happening ??
data is also copied into the string variable ..
is der any problem while using prepare stmt or statement ..
actually m accepting values from text and then inserted to the database .. |
2016-05-31 10:53:58 -0600
| commented question | Data is not inserted into the database .. need help bro .. thanks in advance |
2016-05-31 10:30:34 -0600
| asked a question | Data is not inserted into the database .. when i'm trying to inserting my data into my database the data in not inserted is der any prblm ??
code: try
{
String name=jTextField1.getText();
String stream=jTextField2.getText();
String classes= jTextField3.getText();
String roll_no=jTextField4.getText();
InputStream inputStream = new FileInputStream(new File(filePath));
InputStream inputStream1 = new FileInputStream(new File(filePath1));
//stmt.executeUpdate("insert into student_regestration values( "+name+",'"+stream+"','"+classes+"',"+roll_no+")");
String sql = "insert into student_regestration values( ?,?,?,?,?,?)";
pstmt = con.prepareStatement(sql);
pstmt.setString(1, name);
pstmt.setString(2, stream);
pstmt.setString(3, classes);
pstmt.setString(4, roll_no );
pstmt.setBlob(5, inputStream);
pstmt.setBlob(6, inputStream1);
pstmt.executeUpdate();
System.out.println("Inserted");
}
catch(Exception ex)
{
System.out.println("Not entered" + ex);
//JOptionPane.showMessageDialog(this," Message: "+ex.getMessage());
}
|
2016-05-26 14:48:46 -0600
| commented question | How to compare two image using java in opencv ? |
2016-05-26 14:24:42 -0600
| received badge | ● Editor
(source)
|
2016-05-26 14:09:19 -0600
| asked a question | How to compare two image using java in opencv ? when i'm using this code its not working Error: identifier expected for extractor and detector Thanks is advance public class CompImg {
//Load images to compare
Mat img1 = Highgui.imread("d:/capture1.jpg", Highgui.CV_LOAD_IMAGE_GRAYSCALE);
Mat img2 = Highgui.imread("d:/capture1.jpg", Highgui.CV_LOAD_IMAGE_GRAYSCALE);
MatOfKeyPoint keypoints1 = new MatOfKeyPoint();
MatOfKeyPoint keypoints2 = new MatOfKeyPoint();
Mat descriptors1 = new Mat();
Mat descriptors2 = new Mat();
//Definition of ORB keypoint detector and descriptor extractors
FeatureDetector detector = FeatureDetector.create(FeatureDetector.ORB);
DescriptorExtractor extractor = DescriptorExtractor.create(DescriptorExtractor.ORB);
//Detect keypoints
detector.detect(img1, keypoints1);
detector.detect(img2, keypoints2);
//Extract descriptors
extractor.compute(img1, keypoints1, descriptors1);
extractor.compute(img2, keypoints2, descriptors2);
//Definition of descriptor matcher
DescriptorMatcher matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE_HAMMING);
//Match points of two images
MatOfDMatch matches = new MatOfDMatch();
matcher.match(descriptors1,descriptors2 ,matches);
}
|
2016-05-26 13:24:59 -0600
| commented answer | How to copy recognized image (only recognize image not full image) Break can you help me more ?? i have many question related to my project, and i'm using opencv which is new for me ..
or we cam talk on mail .. Thanks |
2016-05-26 13:07:06 -0600
| received badge | ● Scholar
(source)
|
2016-05-26 13:05:27 -0600
| commented answer | How to copy recognized image (only recognize image not full image) ohh m sorry bro thanks a lot .. its working |
2016-05-26 12:50:59 -0600
| commented answer | How to copy recognized image (only recognize image not full image) it will not giving any error message but video is stop and also face detection is not work,
exception msg is print
Erro: method subrect(rect) , variable frame of type mat |
2016-05-26 12:33:33 -0600
| commented answer | How to copy recognized image (only recognize image not full image) Thanks break for reply but its not working .. now it will not taking any snapshot .. or cam also not visible ..
Error: Mat cropped = frame.subrect(rect); |
2016-05-26 10:59:15 -0600
| asked a question | How to copy recognized image (only recognize image not full image) private DaemonThread myThread = null;
int count = 0;
VideoCapture webSource = null;
Mat frame = new Mat();
MatOfByte mem = new MatOfByte();
CascadeClassifier faceDetector = new CascadeClassifier(FaceCrp.class.getResource("haarcascade_frontalface_alt.xml").getPath().substring(1));
MatOfRect faceDetections = new MatOfRect();
public Point point1,point2;
Image img1;
Rect rect;
/// class DaemonThread implements Runnable {
protected volatile boolean runnable = false;
@Override
public void run() {
synchronized (this) {
while (runnable) {
if (webSource.grab()) {
try {
webSource.retrieve(frame);
Graphics g = jPanel1.getGraphics();
faceDetector.detectMultiScale(frame, faceDetections);
//Highgui.imwrite("d:/capture5.jpg", frame); No face detection till
//Rect rect = new Rect(faceDetections.toArray(frame));
for (Rect rect : faceDetections.toArray()) {
System.out.println("ttt");
Core.rectangle(frame, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),
new Scalar(0, 255,0));
Highgui.imwrite("d:/capture6.jpg", frame);
}
Highgui.imencode(".bmp", frame, mem);
Image im = ImageIO.read(new ByteArrayInputStream(mem.toArray()));
BufferedImage buff = (BufferedImage) im;
if (g.drawImage(buff, 0, 0, getWidth(), getHeight()-150 , 0, 0, buff.getWidth(), buff.getHeight(), null))
{
//Highgui.imwrite("d:/capture2.jpg", frame);
System.out.println("ttt");
if (runnable == false) {
System.out.println("Paused ..... ");
this.wait();
}
}
} catch (Exception ex) {
System.out.println("Error");
}
}
}
}
}
}
Thanks in advance |