Using confocal scanning optical microscopy, we carried out a direct refractive index profiling technique of complex and non-symmetric structured optical fibers. Several improvements on the earlier design are proposed; a light emitting diode (LED) at 658 nm wavelength instead of a laser diode (LD) or He-Ne laser is used as a light source for better index precision, and a simple longitudinal linear scanning and a curve fitting techniques are adapted instead of a servo control for maintaining an optical confocal arrangement. Also, we have developed a novel technique to remove measurement noise generated by pinhole diffraction. This improved, straightforward, and robust method can be used to determine the refractive index profile of optical fibers by determining the reflectivity of a sample's surface. This technique is easy and repeatable, and we demonstrated the refractive index measurement of a core-doped photonic crystal fiber for the first time.