1

I was installing OPENCV on raspberry pi and all are done but when the compilation of opencv it stops at 16%.I used make -j4 as well as make -j1.It gives no error and it comes to build folder.

This is the code which i have used,

pi@raspberrypi:~ $ source ~/.profile
pi@raspberrypi:~ $ workon cv
(cv) pi@raspberrypi:~ $ ls
Desktop    get-pip.py    opencv-3.1.0          opencv.zip  python_games  Videos
Documents  Music         opencv_contrib-3.1.0  Pictures    Templates
Downloads  oldconffiles  opencv_contrib.zip    Public      tf
(cv) pi@raspberrypi:~ $ cd opencv-3.1.0/build
(cv) pi@raspberrypi:~/opencv-3.1.0/build $ make -j4
[ 16%] Built target libprotobuf
[ 16%] Built target libwebp
[ 16%] Built target IlmImf
[ 16%] Built target opencv_core
[ 16%] Built target opencv_flann
[ 16%] Built target opencv_ml
[ 16%] Built target opencv_surface_matching
[ 16%] Built target opencv_imgproc
[ 16%] Built target opencv_video
[ 16%] Built target opencv_reg
[ 16%] Built target opencv_photo
[ 16%] Built target opencv_imgcodecs
[ 16%] Built target opencv_fuzzy
[ 16%] Built target opencv_shape
[ 16%] Built target opencv_videoio
[ 16%] Built target opencv_dnn
[ 16%] Built target opencv_superres
[ 16%] Built target opencv_highgui
[ 16%] Built target example_surface_matching_ppf_normal_computation
[ 16%] Built target example_surface_matching_ppf_load_match
[ 16%] Built target example_reg_map_test
[ 16%] Built target opencv_ts
[ 16%] Built target example_fuzzy_fuzzy_inpainting
[ 16%] Built target example_fuzzy_fuzzy_filtering
[ 16%] Built target example_dnn_caffe_googlenet
[ 16%] Built target opencv_objdetect
[ 16%] Built target opencv_test_superres
[ 16%] Built target opencv_plot
[ 16%] Built target opencv_perf_superres
[ 16%] Built target opencv_xphoto
[ 16%] Built target opencv_bgsegm
[ 16%] Built target opencv_dpm
[ 16%] Built target opencv_bioinspired
[ 16%] Built target opencv_face
[ 16%] Built target opencv_annotation
[ 16%] Built target opencv_features2d
[ 16%] Built target opencv_test_flann
[ 16%] Built target opencv_perf_core
[ 16%] Built target opencv_test_core
[ 16%] Built target opencv_test_ml
[ 16%] Built target opencv_test_photo
[ 16%] Built target opencv_perf_imgproc
[ 16%] Built target opencv_perf_photo
[ 16%] Built target opencv_test_imgproc
[ 16%] Built target opencv_perf_reg
[ 16%] Built target opencv_test_reg
[ 16%] Built target opencv_test_video
[ 16%] Built target opencv_perf_video
[ 16%] Built target opencv_test_dnn
[ 16%] Built target opencv_test_fuzzy
[ 16%] Built target opencv_perf_imgcodecs
[ 16%] Built target opencv_test_shape
[ 16%] Built target opencv_test_imgcodecs
[ 16%] Built target opencv_perf_videoio
[ 16%] Built target opencv_test_objdetect
[ 16%] Built target opencv_test_highgui
[ 16%] Built target opencv_test_videoio
[ 16%] Built target opencv_perf_objdetect
[ 16%] Built target opencv_perf_xphoto
[ 16%] Built target opencv_test_xphoto
[ 16%] Built target example_xphoto_simple_color_balance
[ 16%] Built target opencv_xobjdetect
[ 16%] Built target example_xphoto_grayworld_color_balance
[ 16%] Built target example_xphoto_dct_image_denoising
[ 16%] Built target opencv_test_bgsegm
[ 16%] Built target example_xphoto_inpainting
[ 16%] Built target example_bgsegm_bgfg_gmg
[ 16%] Built target opencv_perf_bioinspired
[ 16%] Built target example_bioinspired_OpenEXRimages_HDR_Retina_toneMapping
[ 16%] Built target opencv_test_bioinspired
[ 16%] Built target example_bioinspired_basicRetina
[ 16%] Built target example_bioinspired_retinaDemo
[ 16%] Built target example_dpm_cascade_detect_sequence
[ 16%] Built target example_dpm_cascade_detect_camera
[ 16%] Built target example_face_facerec_eigenfaces
[ 16%] Built target example_face_facerec_fisherfaces
[ 16%] Built target example_face_facerec_video
[ 16%] Built target example_face_facerec_demo
[ 16%] Built target example_face_facerec_lbph
[ 16%] Built target example_face_facerec_save_load
[ 16%] Built target opencv_perf_features2d
[ 16%] Built target opencv_test_features2d
[ 16%] Built target opencv_line_descriptor
[ 16%] Built target opencv_saliency
[ 16%] Built target opencv_text
[ 16%] Built target opencv_waldboost_detector
[ 16%] Built target opencv_test_line_descriptor
[ 16%] Built target example_line_descriptor_compute_descriptors
[ 16%] Built target opencv_calib3d
[ 16%] Built target example_line_descriptor_lines_extraction
[ 16%] Built target opencv_perf_line_descriptor
[ 16%] Built target example_line_descriptor_knn_matching
[ 16%] Built target example_line_descriptor_lsd_lines_extraction
[ 16%] Built target example_line_descriptor_matching
[ 16%] Built target example_line_descriptor_radius_matching
[ 16%] Built target example_saliency_computeSaliency
[ 16%] Built target example_text_segmented_word_recognition
[ 16%] Built target example_text_cropped_word_recognition
[ 16%] Built target example_text_webcam_demo
[ 16%] Built target example_text_character_recognition
[ 16%] Built target example_text_textdetection
[ 16%] Built target example_text_end_to_end_recognition
[ 16%] Built target opencv_perf_calib3d
[ 16%] Built target opencv_ccalib
[ 16%] Built target opencv_datasets
[ 16%] Built target opencv_test_calib3d
[ 16%] Built target opencv_rgbd
[ 16%] Built target opencv_stereo
[ 16%] Built target opencv_aruco
[ 16%] Built target opencv_videostab
[ 16%] Built target opencv_xfeatures2d
[ 16%] Built target opencv_ximgproc
[ 16%] Built target opencv_createsamples
[ 16%] Built target example_tapi_hog
[ 16%] Built target opencv_traincascade
[ 16%] Built target example_tapi_clahe
[ 16%] Built target example_tapi_pyrlk_optical_flow
[ 16%] Built target example_tapi_bgfg_segm
[ 16%] Built target example_tapi_camshift
[ 16%] Built target example_tapi_tvl1_optical_flow
[ 16%] Built target example_tapi_squares
[ 16%] Built target example_tapi_ufacedetect
[ 16%] Built target example_ccalib_multi_cameras_calibration
[ 16%] Built target example_ccalib_random_pattern_generator
[ 16%] Built target example_ccalib_omni_stereo_calibration
[ 16%] Built target example_ccalib_random_pattern_calibration
[ 16%] Built target example_ccalib_omni_calibration
[ 16%] Built target example_datasets_tr_svt_benchmark
[ 16%] Built target example_datasets_tr_svt
[ 16%] Built target example_datasets_tr_icdar
[ 16%] Built target example_datasets_tr_chars_benchmark
[ 16%] Built target example_datasets_track_vot
[ 16%] Built target example_datasets_slam_tumindoor
[ 16%] Built target example_datasets_slam_kitti
[ 16%] Built target example_datasets_pd_inria[ 16%] Built target opencv_ximgproc
[ 16%] Built target opencv_perf_ximgproc
[ 16%] Built target example_ximgproc_disparity_filtering
[ 16%] Built target example_ximgproc_niblack_thresholding
[ 16%] Built target opencv_test_ximgproc[ 16%] Built target example_tapi_clahe
[ 16%] Built target example_tapi_pyrlk_optical_flow
[ 16%] Built target example_tapi_bgfg_segm
[ 16%] Built target example_tapi_camshift
[ 16%] Built target example_tapi_tvl1_optical_flow
[ 16%] Built target example_tapi_squares
[ 16%] Built target example_tapi_ufacedetect
(cv) pi@raspberrypi:~/opencv-3.1.0/build $ 
  • Without any errors, etc it's a bit of a guess. Maybe the Pi ran out of memory? Do you have swap activated during the build? And if you're on Stretch you could actually try to install it from Pypi / piwheels. There are precompiled wheels available for the standard OpenCV packages (and Python 3). In a Python 3 virtual environment you can install it with pip install – Dirk Nov 5 '18 at 18:08
  • When using make -j4 it was stucked and then i used j1.This happened after using j1.okay i'll have a try with piwheel.Let's see whether it works or not..Thanks – Chamara Madushanka Nov 5 '18 at 18:21

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.