Text this: Direct period measurement for fiber Bragg grating using an optical imaging technique