Fringe projection profilometry (FPP) is a popular optical 3-dimensional (3D) scanning method. However, existing FPP methods often suffer from the ambiguity problem that only the wrapped phase information can be measured while the true phase information is required for 3D measurement. Although various phase unwrapping methods were suggested to recover the wrapped phase in FPP methods, most of them will fail when the target objects have complex structures. To solve this problem, we propose in this paper to embed the fringe pattern with a set of textural patterns to encode the period order of the true phase information. During the offline phase, a convolutional neural network (CNN) is trained to learn a set of filters that will be activated when they see the code patterns. When the encoded fringe image is captured, the modified morphological component analysis is first performed to extract the code pattern. It is then decoded by the trained CNN to estimate the K-map, which contains the period order of the true phase information. Experimental results show that the proposed method can measure the 3D profile of objects with abrupt jumps in height profile, where the conventional approaches often fail to perform. It also has a much higher computational efficiency due to the effective utilization of GPU by CNN.