Skip to content

Commit

Permalink
Edited FaceRecognition component to display all face boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
vanessavun committed Dec 5, 2022
1 parent ce951c1 commit e216083
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/FaceRecognition/FaceRecognition.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
import React from 'react';
import './FaceRecognition.css';

export default function FaceRecognition({ imageURL, box }) {
export default function FaceRecognition({ imageURL, boxes }) {
const styles = {
top: box.topRow,
right: box.rightCol,
bottom: box.bottomRow,
left: box.leftCol
}

// console.log("FaceRecognition box: ", box)
// console.log("FaceRecognition box topRow: ", box.topRow)

return (
<div className='center ma'>
<div className='absolute mt2'>
<img id="inputimage" alt="" src={imageURL} className="mt3" width="500px" height="auto" />
<div className='bounding-box' style={styles}></div>
{boxes.map((box,i) => {
return(
<div key={i}className='bounding-box' style={styles}></div>
)
})}
</div>
</div>
)
Expand Down

0 comments on commit e216083

Please sign in to comment.