{"id":{"repo_id":"calpoly","oai_identifier":"oai:digitalcommons.calpoly.edu:theses-4649"},"canonical_url":"https://search.ndltd.org/etd/calpoly/oai:digitalcommons.calpoly.edu:theses-4649","repository":{"repo_id":"calpoly","name":"Cal Poly","base_url":"https://digitalcommons.calpoly.edu/do/oai/"},"display":{"title":"A Heuristic Approach to Portrait Segmentation and Its Application to Synthetic Bokeh Generation","abstract":"Segmentation of portrait images is an important technique used to separate the foreground and background of an image. This separation of layers is useful for selectively applying post-processing techniques to enhance the quality of the image, such as blurring the background. Automatic portrait segmentation is a complex process that can be completed with a high degree of accuracy using deep learning with neural networks, but training and inference are often very computationally expensive. This thesis aims to take a heuristic approach to portrait segmentation by combining classical image processing and computer vision techniques into a solution that can be run on lower-cost hardware. This allows a simple smartphone to emulate the visually pleasing bokeh background blur effect seen in photos taken on DSLR cameras. This thesis implements a human segmentation workflow that sequentially addresses three key areas: facial skin, hair, and the torso. After a binary mask has been generated, a Gaussian kernel is applied to the background region to introduce the blur. AiSegment.com's Human Matting Dataset and neural network output are used to evaluate the performance of the workflow, where the Intersection over Union (IoU) between masks is calculated. Across 40 test images, the percentage of images with an IoU greater than 0.75 (considered passing) was found to be 87.5% with an average IoU among passing results of 0.8619 and an average processing speed of 0.4263 seconds per image on the faster M1 Pro processor tested. These results show that the heuristic approach is a viable solution.","abstract_html":"Segmentation of portrait images is an important technique used to separate the foreground and background of an image. This separation of layers is useful for selectively applying post-processing techniques to enhance the quality of the image, such as blurring the background. Automatic portrait segmentation is a complex process that can be completed with a high degree of accuracy using deep learning with neural networks, but training and inference are often very computationally expensive. This thesis aims to take a heuristic approach to portrait segmentation by combining classical image processing and computer vision techniques into a solution that can be run on lower-cost hardware. This allows a simple smartphone to emulate the visually pleasing bokeh background blur effect seen in photos taken on DSLR cameras. This thesis implements a human segmentation workflow that sequentially addresses three key areas: facial skin, hair, and the torso. After a binary mask has been generated, a Gaussian kernel is applied to the background region to introduce the blur. AiSegment.com&#x27;s Human Matting Dataset and neural network output are used to evaluate the performance of the workflow, where the Intersection over Union (IoU) between masks is calculated. Across 40 test images, the percentage of images with an IoU greater than 0.75 (considered passing) was found to be 87.5% with an average IoU among passing results of 0.8619 and an average processing speed of 0.4263 seconds per image on the faster M1 Pro processor tested. These results show that the heuristic approach is a viable solution.","abstract_has_math":false,"creators":["Snead, Charles J"],"institution":null,"degree_name":"MS in Electrical Engineering","degree_level":null,"degree_discipline":"Electrical Engineering","degree_department":null,"school":null,"contributors":["Jane Zhang","Electrical Engineering","College of Engineering"],"advisors":[],"committee_chairs":[],"committee_members":[],"year":null,"date_issued":"","date_published":null,"updated_at":"2026-11-19T07:12:29Z","subjects":["Image Processing","Segmentation","Computer Vision","Artificial Blur","Heuristics","Signal Processing"],"languages":[],"rights":[],"rights_urls":[],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"https://digitalcommons.calpoly.edu/theses/2992","outbound_label":"Repository record","outbound_source":"dc:identifier","record_url":"https://digitalcommons.calpoly.edu/theses/2992","record_label":"Repository record","record_kind":"record","record_source":"dc:identifier","download_url":null,"download_label":null,"download_source":null,"access_status":null,"embargo_until":null,"access_note":null},"source_record":{"url":"https://digitalcommons.calpoly.edu/do/oai/?verb=GetRecord&metadataPrefix=oai_etdms&identifier=oai%3Adigitalcommons.calpoly.edu%3Atheses-4649","prefix":"oai_etdms"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor","label":"Contributor","values":["Jane Zhang","Electrical Engineering","College of Engineering"]},{"key":"dc:creator","label":"Author","values":["Snead, Charles J"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.available","label":"Dc Date Available","values":["2025-05-23T07:00:00Z"]},{"key":"dc:date.created","label":"Dc Date Created","values":["2025-05-01T07:00:00Z"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Electrical Engineering"]},{"key":"thesis:degree_name","label":"Degree Name","values":["MS in Electrical Engineering"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Image Processing","Segmentation","Computer Vision","Artificial Blur","Heuristics","Signal Processing"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["https://digitalcommons.calpoly.edu/theses/2992"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["Segmentation of portrait images is an important technique used to separate the foreground and background of an image. This separation of layers is useful for selectively applying post-processing techniques to enhance the quality of the image, such as blurring the background. Automatic portrait segmentation is a complex process that can be completed with a high degree of accuracy using deep learning with neural networks, but training and inference are often very computationally expensive. This thesis aims to take a heuristic approach to portrait segmentation by combining classical image processing and computer vision techniques into a solution that can be run on lower-cost hardware. This allows a simple smartphone to emulate the visually pleasing bokeh background blur effect seen in photos taken on DSLR cameras. This thesis implements a human segmentation workflow that sequentially addresses three key areas: facial skin, hair, and the torso. After a binary mask has been generated, a Gaussian kernel is applied to the background region to introduce the blur. AiSegment.com's Human Matting Dataset and neural network output are used to evaluate the performance of the workflow, where the Intersection over Union (IoU) between masks is calculated. Across 40 test images, the percentage of images with an IoU greater than 0.75 (considered passing) was found to be 87.5% with an average IoU among passing results of 0.8619 and an average processing speed of 0.4263 seconds per image on the faster M1 Pro processor tested. These results show that the heuristic approach is a viable solution."]},{"key":"dc:title","label":"Title","values":["A Heuristic Approach to Portrait Segmentation and Its Application to Synthetic Bokeh Generation"]}]}],"canonical_facts":{"dc:contributor":["Jane Zhang","Electrical Engineering","College of Engineering"],"dc:creator":["Snead, Charles J"],"dc:date.available":["2025-05-23T07:00:00Z"],"dc:date.created":["2025-05-01T07:00:00Z"],"dc:description.abstract":["Segmentation of portrait images is an important technique used to separate the foreground and background of an image. This separation of layers is useful for selectively applying post-processing techniques to enhance the quality of the image, such as blurring the background. Automatic portrait segmentation is a complex process that can be completed with a high degree of accuracy using deep learning with neural networks, but training and inference are often very computationally expensive. This thesis aims to take a heuristic approach to portrait segmentation by combining classical image processing and computer vision techniques into a solution that can be run on lower-cost hardware. This allows a simple smartphone to emulate the visually pleasing bokeh background blur effect seen in photos taken on DSLR cameras. This thesis implements a human segmentation workflow that sequentially addresses three key areas: facial skin, hair, and the torso. After a binary mask has been generated, a Gaussian kernel is applied to the background region to introduce the blur. AiSegment.com's Human Matting Dataset and neural network output are used to evaluate the performance of the workflow, where the Intersection over Union (IoU) between masks is calculated. Across 40 test images, the percentage of images with an IoU greater than 0.75 (considered passing) was found to be 87.5% with an average IoU among passing results of 0.8619 and an average processing speed of 0.4263 seconds per image on the faster M1 Pro processor tested. These results show that the heuristic approach is a viable solution."],"dc:identifier":["https://digitalcommons.calpoly.edu/theses/2992"],"dc:subject":["Image Processing","Segmentation","Computer Vision","Artificial Blur","Heuristics","Signal Processing"],"dc:title":["A Heuristic Approach to Portrait Segmentation and Its Application to Synthetic Bokeh Generation"],"thesis:degree_discipline":["Electrical Engineering"],"thesis:degree_name":["MS in Electrical Engineering"]},"updated_at":"2026-11-19T07:12:29Z"}