Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
20 lines (17 loc) · 766 Bytes

File metadata and controls

20 lines (17 loc) · 766 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package dip;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.Point;
import org.opencv.core.Scalar;
import org.opencv.imgcodecs.Imgcodecs;
import org.opencv.imgproc.Imgproc;
import org.scijava.nativelib.NativeLoader;
import java.io.IOException;
public class ApplyingWatermark {
public static void main(String[] args) throws IOException {
NativeLoader.loadLibrary(Core.NATIVE_LIBRARY_NAME);
Mat source = Imgcodecs.imread("data/dip/digital_image_processing.jpg", Imgcodecs.CV_LOAD_IMAGE_COLOR);
Imgproc.putText(source, "dip.hellonico.info", new Point(source.rows() / 2, source.cols() / 2), Imgproc.FONT_ITALIC, new Double(1), new Scalar(255));
Imgcodecs.imwrite("watermarked.jpg", source);
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.