Three dimensional television (3DTV) and free viewpoint television (FTV) are believed to be the future of television broadcasting that would bring a more life-like and visually immersive home entertainment experience. These technologies will provide the users with the freedom to navigate through the scene and choosing a desired viewpoint. A desired viewpoint video can be synthesized at the receiver side using depth image-based rendering (DIBR). In this paper, we present a new method for objectively evaluating the quality of stereoscopic 3D videos generated by DIBR. The quality of the synthesized 3D videos is affected by errors or noise in the depth maps. To evaluate the distortions in DIBR-based 3D videos a reference depth is needed for evaluation. In this paper, we show how to derive an ideal depth estimate at each pixel value that would constitute a distortion-free rendered video. The ideal depth estimate will then be used to derive three distortion measures to objectify the visual discomfort in the stereoscopic videos. The three measures are defined as temporal outliers (TO), temporal inconsistencies (TI), and spatial outliers (SO). The combination of the three measures will constitute a visual quality measure for 3D DIBR-based videos, 3VQM. 3VQM can be both derived in a full-reference (FR-3VQM) and noreference (NR-3VQM) scenarios. Finally, the proposed measure will be verified and validated against a fully conducted subjective evaluation and compared to 2D-based quality measures used in literature to evaluate 3D video quality. The results show that our proposed measure is significantly accurate, coherent and consistent with the subjective scores and outperforms the few 2D-based metrics proposed in literature.